The Xcode 12 release supports on-device debugging for iOS 9 and later, tvOS 9 and later, and watchOS 2 and later. Xcode 12 includes SDKs for iOS 14, iPadOS 14, tvOS 14, watchOS 7, and macOS Catalina 10.15.6. So it assumes to make more steps, but the result is more customizable and haven't some side effects, like moving from view together with presented view. Update your apps to use new features, and test your apps against API changes. The right way do to so is to make custom UIViewControllerAnimatedTransitioning for presented VC delegate. Read up all answers and can't see correct solution. It can be of any value, either true or false. Seems like the animated parameter in the presentViewController method doesn't really matter in this case of custom transition. PresentViewController(dashboardWorkout, animated: false, completion: nil) View.window!.layer.addAnimation(transition, forKey: kCATransition) Transition.timingFunction = CAMediaTimingFunction(name:kCAMediaTimingFunctionEaseInEaseOut) Transition.subtype = kCATransitionFromRight Swift 2.x let transition = CATransition() You only need to set the states and SwiftUI will figure out for you the transition between the two states. Transition.subtype = kCATransitionFromRight Transitions are like Magic Move in Keynote. Present(dashboardWorkout, animated: false, completion: nil) View.window!.layer.add(transition, forKey: kCATransition) Transition.timingFunction = CAMediaTimingFunction(name:CAMediaTimingFunctionName.easeInEaseOut) Swift 3 & 4.2 let transition = CATransition() Sample project with Swift 4 implementation added to GitHub Normally, the right to left transition is used when you push a view controller into presentor's UINavigiationController.Īdded timing function kCAMediaTimingFunctionEaseInEaseOut It doesn't matter if it is xib or storyboard that you are using.
0 Comments
Leave a Reply. |