[TIMOB-24841] iOS: Expose Alert Dialog TintColor
| GitHub Issue | n/a |
|---|---|
| Type | Improvement |
| Priority | Critical |
| Status | Closed |
| Resolution | Fixed |
| Resolution Date | 2017-06-26T15:02:58.000+0000 |
| Affected Version/s | Release 6.1.0 |
| Fix Version/s | Release 6.2.0 |
| Components | iOS |
| Labels | alertdialog, qe-6.2.0, tintColor |
| Reporter | Joseph Sachs |
| Assignee | Hans Knöchel |
| Created | 2017-06-16T13:36:33.000+0000 |
| Updated | 2017-06-26T15:04:59.000+0000 |
Description
Alert Dialog has had tintColor since iOS 8+:
UIAlertController *alertController = ....
[alertController.view setTintColor:[UIColor greenColor]];
Would it possible to implement this in Titanium?
You can use the
Ti.UI.setTintColor('green')method / computed property for setting a global tint-color already, but I see the point of using it for the alert specifically as well. I assumemyAlert.tintColor = 'green'does not work?PR: https://github.com/appcelerator/titanium_mobile/pull/9150 Test-Case:
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: 'My Dialog', message: 'Hello World', buttonNames: ['OK'], tintColor: 'red' }); alert.show(); }); win.add(btn); win.open();conforms very well :)Approved! tintColor property for AlertDialog is now supported. Tested with both string & hex color values, as well as checking for errors if incorrect argument values are specified. Tested On: iPhone 7 10.3.2 Device & Simulator Mac OS Sierra (10.12.5) Ti SDK: 6.2.0.v20170626070527 Appc NPM: 4.2.9 App CLI: 6.2.2 Xcode 8.3.3 Node v4.6.0 Closing ticket.