Combining Navigation Controller with Tab Bar Controller

后端 未结 1 321
别那么骄傲
别那么骄傲 2021-01-13 02:31

As I mentioned in the title, I want to add Navigation Controller to my application which already has a Tab Controller. So trying to do the staff so

1条回答
  •  广开言路
    2021-01-13 02:53

    Try to remove navigation controller from xib, so it only have view controller, then initialize navigation controller programatically:

    UIViewController *tmpViewController1 = [[[YourViewController alloc] init] initWithNibName:@"YourViewController" bundle:nil];
     UINavigationController *viewController1 =  [[UINavigationController alloc] initWithRootViewController:tmpViewController1];
    

    0 讨论(0)
提交回复
热议问题