我想要在- (BOOL)application:(UIApplication )application didFinishLaunchingWithOptions:(NSDictionary )launchOptions中弹出present出一个UIViewAlertViewController,效果就是在启动页的时候弹出更新提示,但是因为当前的这个window还没有成为keyWindow,所以在启动页消失后,层次图就会变成下面这样。
是否只能等首页出现弹出UIAlertViewController才能正确的在keyWindow上弹出?
[[UIApplication sharedApplication].keyWindow.rootViewController presentViewController:alertControler animated:YES completion:^{
}];
也使用过
UIWindow *window = [UIApplication sharedApplication].delegate.window;
[window makeKeyAndVisible];
[window.rootViewController presentViewController:alertControler animated:YES completion:^{
}];
1.怎么样才是正确的姿势。。。
2.是否是因为当前的keyWindow和启动图过后出现首页时的keyWindow不同。(我觉得是这个原因)
Selon vos besoins, vous devez opérer dans la page de démarrage au lieu de la classe d'entrée
Pourquoi ne pas le tester et imprimer leurs adresses pour voir si elles sont identiques ?
N'est-il pas possible de pousser en utilisant la navigation ?
Pourquoi devez-vous utiliser keywindow ? Vous ne pouvez pas utiliser le contrôleur de navigation ou tabBarController ?