开发者

Pop and push the same view does not invoke the viewWillAppear() method

When I receive a local notification i do the following:

- (void)application:(UIApplication *)application didReceiveLocalNotification:(UILocalNotification *)notif {
    [navController popToRootViewControllerAnimated:NO];
    [navController pushViewControll开发者_StackOverflower: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?


Try:

[notificationSplashViewController.view removeFromSuperview];
[navController popToRootViewControllerAnimated:NO];
[navController pushViewController:notificationSplashViewController animated:YES];

for me, this did the trick.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜