iPhone UILocalNotification 加载特定视图 [英] iPhone UILocalNotification load specific view

查看:25
本文介绍了iPhone UILocalNotification 加载特定视图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的本​​地通知正在运行,但是当我单击视图"返回应用程序时,在应用程序委托中,我试图加载特定视图,但它不会加载.这可能吗?它总是回到上次查看的视图.

I have my local notification working, but when I click View to come back to the app, in the app delegate I am trying to load a specific view, but it wont take. Is this possible or not? It always just comes back to the last view viewed.

推荐答案

当您点击通知上的查看"时,它会将您带回您的应用程序,您的应用程序会显示之前显示的任何内容(如果它是后台显示的)或已启动.

When you tap "View" on the notification, it takes you back to your application, and your application shows whatever it was showing before (if it was backgrounded) or is launched.

如果您需要显示特定 UI 以响应通知,请考虑实施 方法 -[应用程序:didReceiveLocalNotification:].在该方法中,您可以检查通知并转换到适当的界面.

If you need to show a particular UI in response to the notification, consider implementing the <UIApplicationDelegate> method -[<UIApplicationDelegate> application:didReceiveLocalNotification:]. In that method you can inspect the notification and transition to the appropriate interface.

这篇关于iPhone UILocalNotification 加载特定视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆