1.首先在Appdalegate.h 修改如下
@interface AppDelegate : UIResponder <UIApplicationDelegate> { UINavigationController *_navigationController; } @property (nonatomic, retain)UINavigationController *navigationController;
2.然后在Appdalegate.m 修改如下
self.navigationController = [[UINavigationController alloc]initWithRootViewController:self.viewController];
self.window.rootViewController = self.navigationController;
这样就完成了