获取当前的window 以及设置其rootViewController

AppDelegate *app = [[UIApplication sharedApplication] delegate];
            app.window.rootViewController = [[RootViewController alloc] init];
原文地址:https://www.cnblogs.com/tian-sun/p/5019857.html