在 ios4 开发中触发本地通知时,如何在运行时设置警报正文文本?

发布于 2024-11-07 09:03:30 字数 183 浏览 2 评论 0 原文

我正在开发一个 iPhone 应用程序。

我将使用本地通知。我想要的是动态设置alertbody的文本。

基本上,alertbody 是在安排本地通知时静态设置的。

但是,在我的应用程序中,应该在触发通知时下载文本。

我可以这样做吗? 任何人都可以帮助我..

提前致谢。

i'm developing an iphone app.

i'm gonna use local notification. what i want is to set text of alertbody dynamically.

basically, alertbody is set statically when the local notification is scheduled.

but, in my app, the text should be downloaded when the notification is fired.

can i do this?
anyone help me..

thanks in advance.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

谁对谁错谁最难过 2024-11-14 09:03:30

您无法安排通知在触发通知时生成自定义消息。

如果您的应用程序在后台运行,您可以立即触发本地通知。请参阅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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文