pushViewController在收到通知时冻结

时间:2014-04-01 20:09:32

标签: ios objective-c uinavigationcontroller

我的应用已注册远程通知,当我有一个

- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo
{
        [self openTopicWithID:[userInfo objectForKey:@"ID"]];
}

启动视图控制器并将其推送到导航控制器

- (void)openTopicWithID:(NSString *)ID
{
    UINavigationController *rootController = (UINavigationController *)self.window.rootViewController;
    UIStoryboard *iPhone35Storyboard = [UIStoryboard storyboardWithName:@"StoryboardiPhone" bundle:nil];
    UICommentList *commentList = [iPhone35Storyboard instantiateViewControllerWithIdentifier:@"CommentView"];
    commentList.postID = ID;
    commentList.comesFromPush = YES;
    [rootController pushViewController:commentList animated:YES];
}

问题是我的应用程序被卡住了并且没有错误或崩溃 - 它只占用了100%的CPU和内存使用率。

0 个答案:

没有答案