Navigation View in Modal View

后端 未结 3 855
忘了有多久
忘了有多久 2021-01-03 15:00

I am new to modal views and cant seem to get a navigation view display in a modal view.

How do I build a navigation view in the modal view?

相关标签:
3条回答
  • 2021-01-03 15:17

    As sha stated:

    MyViewController *myViewController = [[MyViewController alloc] init];
    UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:myViewController];
    [[self navigationController] presentModalViewController:navController animated:YES];
    
    0 讨论(0)
  • 2021-01-03 15:32

    You create a UINavigrationController, then add UIViewController to it, then you present navigation controller with presentModalViewController

    0 讨论(0)
  • 2021-01-03 15:34

    You can use a navigation controller as a modal view controller.

    [parent presentModalViewController:myNavigationController animated:YES];
    
    0 讨论(0)
提交回复
热议问题