LoginViewController * loginVC = [[LoginViewController alloc]init]; 找window的三種方式 1、// UIWindow * window = [UIApplication sharedApplication].delegate.wi ...
LoginViewController * loginVC = [[LoginViewController alloc]init]; 找window的三種方式 1、// UIWindow * window = [UIApplication sharedApplication].delegate.window;等同於 UIWindow * window = [[[UIApplication sharedApplication]delegate]window]; 2、// UIWindow * window = [UIApplication sharedApplication].keyWindow; 3、 UIWindow * window = [[UIApplication sharedApplication].windows objectAtIndex:0]; window.rootViewController = loginVC;