在 ios4 开发中触发本地通知时,如何在运行时设置警报正文文本?
我正在开发一个 iPhone 应用程序。
我将使用本地通知。我想要的是动态设置alertbody的文本。
基本上,alertbody 是在安排本地通知时静态设置的。
但是,在我的应用程序中,应该在触发通知时下载文本。
我可以这样做吗? 任何人都可以帮助我..
提前致谢。
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您无法安排通知在触发通知时生成自定义消息。
如果您的应用程序在后台运行,您可以立即触发本地通知。请参阅Apple 本地和推送通知编程指南中此页面的列表 2-2
You can't schedule a notification to have a custom message that is generated when the notification is fired.
If your app is running in the background you could fire an immediate local notification instead. See Listing 2-2 of this page on Apple's Local and Push Notification Programming Guide