弹出和推送同一视图不会调用 viewWillAppear() 方法
当我收到本地通知时,我会执行以下操作:
- (void)application:(UIApplication *)application didReceiveLocalNotification:(UILocalNotification *)notif { [navController popToRootViewControllerAnimated:NO]; [navController pushViewController:notificationSplashViewController animated:YES]; }
如果我的 notificationSplashViewController
是当前 ViewController,则不会调用其 viewWillAppear()
方法。如何检测 notificationSplashViewController
的重新推送?
When I receive a local notification i do the following:
- (void)application:(UIApplication *)application didReceiveLocalNotification:(UILocalNotification *)notif { [navController popToRootViewControllerAnimated:NO]; [navController pushViewController:notificationSplashViewController animated:YES]; }
If my notificationSplashViewController
is the current ViewController, its viewWillAppear()
method is not invoked. How can I detect the re-push of notificationSplashViewController
?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试一下:
对我来说,这成功了。
Try:
for me, this did the trick.