ios - PhoneGap-iOS,如何显示带有红色按钮的对话框?

标签 ios cordova

我正在 iOS 上使用 Phonegap,以下是显示对话框的代码:

navigator.notification.confirm(
              'Which color do you like most?'
            , confirmCB
            , 'Title | Confirm'
            , 'Green,Red'
        );  

我想显示带有红色取消按钮的确认对话框,但我不知道如何操作。请帮忙。

最佳答案

这对于phonegap来说是不可能的。

navigator.notification.confirm 使用原生的 UIAlertViewUIAlertView 按钮为蓝色/灰色,取消按钮为深蓝色/灰色

您可以尝试使用此库创建插件 BlockAlerts And ActionSheets

或者使用 javascript/css 警报替换

关于ios - PhoneGap-iOS,如何显示带有红色按钮的对话框?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15897931/

相关文章:

android - 在 Phonegap 中读取 URL/Google Docs/XML

php - 如何从 Android 中的手机间隙文件上传中读取分块数据

iphone - iOS 帮助 : Custom design for UITableViewCell class is not showing up in UITableView

ios - 在 iTunes Connect 中重复使用应用程序名称会出现验证错误

iphone - 无法获取自定义 rightBarButtonItem

ios - iOS 8 的 ActionSheetPicker 替代品

ios - 重置标签中的当前页码

java - Phonegap vs native on android 性能测试

ios - Phonegap 相机

javascript - 关闭phonegap中的上一页