#sharedApplication

[UIApplication sharedApplication].keyWindow和[[UIApplication sharedApplication].delegate window]区别

这说明在执行didFinishLaunchingWithOptions:这个代理方法时,在执行[self.windowmakeKeyAndVisible];方法之前,通过[UIApplicationsharedApplication].keyWindow方法获取不到window,且在执行[UIApplicationsh...