[TIMOB-10507] iOS: Text/password inputs for AlertDialog
GitHub Issue | n/a |
---|---|
Type | New Feature |
Priority | Critical |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2012-09-18T11:56:40.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | n/a |
Labels | alertdialog, input, password, style, textfield |
Reporter | Hidayet Dogan |
Assignee | Betty Tran |
Created | 2012-08-16T02:41:20.000+0000 |
Updated | 2017-03-09T22:13:16.000+0000 |
Description
It would be nice to have text and password inputs can be enabled for AlertDialog. "style" API property can be used for this purpose. (UIAlertView alertViewStyle property).
For example:
var dialog = Ti.UI.createAlertDialog({
title: 'Please enter your name',
style: Ti.UI.iOS.AlertDialogStyle.PLAIN_TEXT_INPUT /* default is Ti.UI.iOS.AlertDialogStyle.DEFAULT */
});
and the text can be passed to AlertDialog's "click" event (fired by clickedButtonAtIndex).
I'm going to submit pull request for this feature, here is the functional test code:
Git commit can be found at https://github.com/appcelerator/titanium_mobile/pull/2789 I've functionally tested with the code below using iOS 5 SDK.
merge pulled.
Closing ticket as fixed.