【发布时间】:2014-02-18 08:42:06
【问题描述】:
在我的应用程序中,我将 UINavigationController 作为初始视图, 层次是这样的
UINavigationController-->LoginViewController -->UITabBarController-->UINavigationController -->MasterViewController
MasterViewController 本身就有 tableView
当推送通知到来时,我在应用程序在后台运行时单击推送通知,然后应用程序打开 masterViewController,问题是当我从推送通知打开应用程序时,我想更新 MasterviewController 中的 tableList。
我尝试像这样从 AppDelegate 导航到 MasterViewController
-(void) application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo {
UINavigationController * navController = (UINavigationController *) self.window.rootViewController;
MasterViewController * masterController = [navController.viewControllers objectAtIndex:0];
[masterController updateList];
}
它不起作用,我如何在收到推送时更新 MasterViewController?
谢谢。
【问题讨论】:
标签: ios iphone objective-c uiviewcontroller