如何在下一个类的任何类的viewDidLoad
方法中添加navigationcontroller,我没有在appdelegate的开头添加它。
最佳答案
YourViewController *report = [[YourViewController alloc] init]; // create Object of YourViewController
UINavigationController *navigationController = [[UINavigationController alloc]initWithRootViewController:report]; // add YourViewController as root view controller of UINavigationController
[self presentModalViewController:navigationController animated:YES];