iOS 10 Programming Cookbook by Hossam Ghareeb

iOS 10 Programming Cookbook by Hossam Ghareeb

Author:Hossam Ghareeb [Ghareeb, Hossam]
Language: eng
Format: azw3
Publisher: Packt Publishing
Published: 2017-04-06T04:00:00+00:00


Now the animator is ready to animate the views. Let's tell the navigation controller to user this animator instead of the native one.

Now, open MasterViewController to add an extension to it to conform to the UINavigationControllerDelegate protocol.

Add the following extension at the bottom of the MasterViewController file:extension MasterViewController: UINavigationControllerDelegate{ func navigationController(_ navigationController: UINavigationController, animationControllerFor operation: UINavigationControllerOperation, from fromVC: UIViewController, to toVC: UIViewController) -> UIViewControllerAnimatedTransitioning? { let animator = NavigationFlipAnimator() animator.navigationOperation = operation return animator } }



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.