[TIMOB-23675] iOS9: Support preferred alert action
| GitHub Issue | n/a |
|---|---|
| Type | New Feature |
| Priority | Low |
| Status | Closed |
| Resolution | Fixed |
| Resolution Date | 2016-07-25T16:50:59.000+0000 |
| Affected Version/s | n/a |
| Fix Version/s | Release 6.0.0 |
| Components | iOS |
| Labels | alertdialog, ios, qe-6.0.0 |
| Reporter | Hans Knöchel |
| Assignee | Hans Knöchel |
| Created | 2016-07-24T16:06:42.000+0000 |
| Updated | 2016-09-22T18:37:13.000+0000 |
Description
iOS 9 offers a way to set a "preferred" action that is highlighted visually. It's the only alert-component we do not support, yet.
PR: https://github.com/appcelerator/titanium_mobile/pull/8153 Demo:
var win = Ti.UI.createWindow({ backgroundColor: "#fff" }); var btn = Ti.UI.createButton({ title: "Show alert" }); btn.addEventListener("click", function() { var alert = Ti.UI.createAlertDialog({ title: "Test", message: "Message", buttonNames: ["OK", "Cancel", "Destructive"], cancel: 1, destructive: 2, preferred: 0 }); alert.addEventListener("click", function(e) { Ti.API.warn(e); }) alert.show(); }); win.add(btn); win.open();Verified support for preferred alert action for iOS9. Tested On: iPhone 5S 9.3.5 Device & Simulator Mac OSX El Capitan 10.11.6 Ti SDK: 6.0.0.v20160921191053 Appc Studio: 4.8.0.201609101003 Appc NPM: 4.2.8-6 App CLI: 6.0.0-45 Xcode 8.0 Node v4.4.7 *Closing ticket.*