iOS – Push viewController from code and storyboard

Objective-C: PlaceViewController *newView = [self.storyboard instantiateViewControllerWithIdentifier:@”storyBoardIdentifier”]; [self.navigationController pushViewController:newView animated:YES]; Please do notice below points, your storyboard identifier is correct. The root view have navigation Controller. Swift: let newView = self.storyboard?.instantiateViewController(withIdentifier: “storyBoardIdentifier”) as! PlaceViewController self.navigationController?.pushViewController(newView, animated: true)

Restore pre-iOS7 UINavigationController pushViewController animation

I managed to workaround the new transition type by creating a category for UINavigationController. In my case I needed to revert it to the old transition style because I have transparent viewControllers that slide over a static background. UINavigationController+Retro.h @interface UINavigationController (Retro) – (void)pushViewControllerRetro:(UIViewController *)viewController; – (void)popViewControllerRetro; @end UINavigationController+Retro.m #import “UINavigationController+Retro.h” @implementation UINavigationController (Retro) – … Read more

Completion handler for UINavigationController “pushViewController:animated”?

See par’s answer for another and more up to date solution UINavigationController animations are run with CoreAnimation, so it would make sense to encapsulate the code within CATransaction and thus set a completion block. Swift: For swift I suggest creating an extension as such extension UINavigationController { public func pushViewController(viewController: UIViewController, animated: Bool, completion: @escaping … Read more

How to get navigation based template functionality in Swift programming

I would like to replicate your idea into what I usually do in the following example. This is how my storyboard looks like: As you can see login/signup and Tab bar is not connected with any kind of Segue. Here Sign in Navigation controller is setup of Initial Controller. Assign This Navigation Controller an Storyboard … Read more

Showing pushviewcontroller animation look like presentModalViewController

If you want to a fade animation, this approach works. CATransition* transition = [CATransition animation]; transition.duration = 0.3; transition.type = kCATransitionFade; transition.subtype = kCATransitionFromTop; [self.navigationController.view.layer addAnimation:transition forKey:kCATransition]; [self.navigationController pushViewController:gridController animated:NO];