【发布时间】:2014-07-24 20:53:37
【问题描述】:
您好,我想在应用委托中使用此代码
ChatController *chatController = [[AppDelegate appDelegate] instantiateViewControllerWithIdentifier:@"GroupController"];
chatController.targetUserid = userid;
[self.navigationController pushViewController:groupChatController animated:YES];
如何从 appdelegate 推送 viewcontroller 我的意思是让上面的代码工作 因为 self.navigationcontroller 不起作用:$
【问题讨论】:
-
如果您使用故事板,请使用此链接stackoverflow.com/questions/23102978/…
-
如果您使用的是 XIB,请使用此链接 stackoverflow.com/questions/20742745/…
-
你确认 self.navigationController == nil 了吗?可能调用这段代码的ViewController不在navigationController下。
-
我的意思是上面发布的这段代码可以写在appdelegate中因为我希望用户看到推送通知,如果推送通知上面的代码将用户发送到聊天控制器@tyt_g207
标签: ios uinavigationcontroller