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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
当您点击通知上的“查看”时,它会将您带回到您的应用程序,并且您的应用程序会显示之前显示的内容(如果它处于后台)或启动的内容。
如果您需要显示特定的 UI 来响应通知,请考虑实现
方法-[;应用程序:didReceiveLocalNotification:]
。在该方法中,您可以检查通知并转换到适当的界面。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.
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.