Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-23675] iOS9: Support preferred alert action

GitHub Issuen/a
TypeNew Feature
PriorityLow
StatusClosed
ResolutionFixed
Resolution Date2016-07-25T16:50:59.000+0000
Affected Version/sn/a
Fix Version/sRelease 6.0.0
ComponentsiOS
Labelsalertdialog, ios, qe-6.0.0
ReporterHans Knöchel
AssigneeHans Knöchel
Created2016-07-24T16:06:42.000+0000
Updated2016-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.

Comments

  1. Hans Knöchel 2016-07-24

    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();
       
  2. Harry Bryant 2016-09-22

    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.*

JSON Source