Search code examples
iphoneiosxcodeios5ios6

Loading specific scene in Navigation View Controller


I created a Navigation View Controller. The static table view cell pushes me to a "Personalization" view. So, how can I programmatically load this view from another in this controller hierarchy?

enter image description here

With this line of code the navigationbar will be hidden…

UIViewController *vc = [sb instantiateViewControllerWithIdentifier:@"personalizationView"];
    vc.modalTransitionStyle = UIModalTransitionStyleCoverVertical;
    [self presentViewController:vc animated:YES completion:NULL];

Solution

  • The proper way is to draw another segue from the other view controller.

    You can then "push" in code:

    [self performSegueWithIdentifier:@"ShowPersonalization" sender:self];