iphone - 本地通知有 2 个选项 1.oK 和第二个本地通知操作 View 或其他任何内容

标签 iphone objective-c ios xcode sdk

<分区>

本地通知有 2 个选项 1.oK 和第二个本地通知操作 View 或任何其他...我们可以更改“确定”按钮文本并对其执行一些操作吗?

最佳答案

实际上,doc说,

The message consists of the application name, a short message, and (in this case) two buttons: Close and View. The button on the right is called the action button and its default title is “View”. An application can customize the title of the action button and can internationalize the button title and the message so that they are in the user’s preferred language.

您不能更改“关闭”按钮的文本。如果要更改右键的文本,请使用以下命令,

localNotif.alertAction = @"Show Me"; // Or something else

关于iphone - 本地通知有 2 个选项 1.oK 和第二个本地通知操作 View 或其他任何内容,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6409917/

上一篇:ios - 在 iphone 中从另一个安装/更新应用程序

下一篇:ios - 完整的新手需要为 iPad 应用程序指明正确的方向

相关文章:

iphone - UITableView 索引可以跳转到行而不是节吗?

ios - 在 iPhone 上运行 React Native 应用程序

iphone - 制作应用 Urban Airship

ios - UIStackView - 将图像定位在 sibling 的边缘

android - 关节体不跟随真实的 body

iphone - 如何在 iOS 中创建一个后台线程,该线程在应用程序从 View 中隐藏后继续

ios - 尝试在 iPhone 上以模态方式呈现 UIImagePickerController 时崩溃

ios - 日期未显示在 JSQMessagesViewcontroller 聊天页面中

iphone - 复制 NSMutableArray 时出现问题

ios - UIPickerView 忽略约束