(ios) 我如何从委托中接收 didReceiveLocalNotification
我正在尝试安排 UILocalNotification 来启动或获取我的应用程序的前台。 我知道委托函数有 didReceiveLocalNotification,但我想在视图控制器中了解此通知。
有人知道是否可以向这些本地通知添加观察者?
感谢您的帮助!
I m trying to get a UILocalNotification scheduled to launch or get foreground my application.
I know delegate function has didReceiveLocalNotification, but I would like to be aware of this notification in a view controller.
Anyone knows if it is possible to add an observer to these local notifications?
Thanks for the help!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
为什么不使用
NSNotificationCenter
在didReceiveLocalNotification
中自己发布通知?在您的视图控制器中,您可以观察该用户定义的通知。
Why don't post a notification yourself in
didReceiveLocalNotification
usingNSNotificationCenter
?In your view controller then you can observe that user-defined notification.