AppDelegate 里一个基本的跳转方法,用来在rootView崩溃的时候直接调试我自己的页面

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
    self.window.rootViewController = [[MHSlidingManager sharedInstance] getSideViewController];
    self.window.backgroundColor = [UIColor whiteColor];
    [self.window makeKeyAndVisible];
    return YES;
}

改为

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
//    self.window.rootViewController = [[MHSlidingManager sharedInstance] getSideViewController];
    self.window.backgroundColor = [UIColor whiteColor];
    MHBaseNavigationController *baseNav = [[MHBaseNavigationController alloc] initWithRootViewController:[[MHBaseContentViewController alloc] init]];
 
    self.window.rootViewController = baseNav;
    
    [self.window makeKeyAndVisible];
    return YES;
}
原文地址:https://www.cnblogs.com/guozai9527/p/4025694.html