当用户滑动查看通知并且应用程序位于前台时。我们可以使其转到应用程序中的特定控制器吗?
我有一个应用程序,其中推送通知工作正常,但是当用户滑动时我可以让它转到特定的控制器。
如果有人能以正确的方式指导我。 这将是一个很大的帮助。
谢谢
更新
- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo {
BeepsDetail *objCont = [[BeepsDetail alloc] initWithNibName:@"BeepsDetail" bundle:nil];
objCont.mId =@"1600";
objCont.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
[[self navigationController ] pushViewController:objCont animated:YES];
[window addSubview:navigationController.view];
[objCont release];}
I have an app in which i have push notifications working properly but when a user slides can i make it go to a specific controller.
If anyone could direct me in the right way.
That would be a great help.
Thnx
UPDATED
- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo {
BeepsDetail *objCont = [[BeepsDetail alloc] initWithNibName:@"BeepsDetail" bundle:nil];
objCont.mId =@"1600";
objCont.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
[[self navigationController ] pushViewController:objCont animated:YES];
[window addSubview:navigationController.view];
[objCont release];}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您的应用程序委托应该实现此方法;
在这个方法中,您可以做任何您想做的事情,例如实例化视图控制器并将其视图作为子视图添加到主窗口,或者放置模态视图等。
Your app delegate should implement this method;
Inside this method, you can do whatever you want to, such as instantiate a view controller and add it's view as a subview to the main window, or put up a modal view, etc.