Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-17687] iOS8: Refactor Alert

GitHub Issuen/a
TypeImprovement
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2014-10-01T20:32:27.000+0000
Affected Version/sRelease 3.4.0
Fix Version/sRelease 3.4.2, Release 3.5.0, Release 4.0.0
ComponentsiOS
Labelsios8, module_alertdialog, qe-3.4.1, qe-manualtest
ReporterVishal Duggal
AssigneeVishal Duggal
Created2014-09-13T18:53:47.000+0000
Updated2014-12-03T22:09:45.000+0000

Description

iOS8 has moved over AlertDialog and OptionDialog to UIAlertController Also the correct way to show popovers is now to set the modalPresentationStyle to UIModalPresentationPopover Titanium needs to refactor these three proxy classes. Will probably also need to change the supported API.

Comments

  1. Vishal Duggal 2014-10-01

    Pull pending master - https://github.com/appcelerator/titanium_mobile/pull/6188 3_4_X - https://github.com/appcelerator/titanium_mobile/pull/6189
  2. Vishal Duggal 2014-10-01

    Sample test case. Change the values of the creation dictionary to see behavior and UI changes.
       var win = Ti.UI.createWindow({backgroundColor:'white'});
       
       var btn = Ti.UI.createButton({title:'ALERT'});
       
       win.add(btn);
       
       win.open();
       
       
       function clickhandler(e){
       	Ti.API.info(JSON.stringify(e));
       }
       
       
       btn.addEventListener('click',function(e){
       	var alertDialog = Ti.UI.createAlertDialog({
       		title:'Alert!',
       		message:'Hello World!',
       		buttonNames:['OK','Cancel'],
       		cancel:1,
       		style:3,
       		persistent:true
       	});
       	alertDialog.addEventListener('click',clickhandler)
       	alertDialog.show();
       })
       
  3. Olga Romero 2014-10-06

    Tested the above code using Mac osx 10.9.5 Mavericks Appcelerator Studio, build: 3.4.0.201409261245 Titanium SDK, build: 3.4.1.v20141006141715 acs@1.0.18 alloy 1.5.1 install@0.1.7 npm@1.4.23 sudo@1.0.3 titanium 3.4.0 titanium-code-processor@1.1.1 Xcode6.1GM Device: iPhone 6 iOS 8.1 iPad mini iOS 8.1 Compared with iPad mini iOS 7.0.3 behavior

JSON Source