[TIMOB-138] inputs inside alertdialogs
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Invalid |
Resolution Date | 2011-04-15T02:24:13.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | iOS |
Labels | n/a |
Reporter | Kevin Holland |
Assignee | Reggie Seagraves |
Created | 2011-04-15T02:24:12.000+0000 |
Updated | 2017-03-09T21:09:40.000+0000 |
Description
I came across something else i use in my obj-c apps that I cant seem to find any documentation about doing with titanium. Input fields inside an alert. I use it for a account register dialog (much easier and imo smoother progression).
here an example of how its done in objective c
UIAlertView *alert = [[UIAlertView alloc] initWithTitle: @"Register Account" message: @"" delegate: self cancelButtonTitle: @"Nevermind" otherButtonTitles: @"Register!", nil];
[alert addTextFieldWithValue: @"" label: @"Email"];
[alert addTextFieldWithValue: @"" label: @"Password"];
[alert addTextFieldWithValue: @"" label: @"Password Confirm"];
emailField = [alert textFieldAtIndex:0];
emailField.keyboardType = UIKeyboardTypeAlphabet;
emailField.keyboardAppearance = UIKeyboardAppearanceAlert;
emailField.autocorrectionType = UITextAutocorrectionTypeNo;
emailField.autocapitalizationType = UITextAutocapitalizationTypeNone;
passwordField = [alert textFieldAtIndex:1];
passwordField.clearButtonMode = UITextFieldViewModeWhileEditing;
passwordField.keyboardType = UIKeyboardTypeNumbersAndPunctuation;
passwordField.keyboardAppearance = UIKeyboardAppearanceAlert;
passwordField.autocorrectionType = UITextAutocorrectionTypeNo;
passwordField.secureTextEntry = YES;
passwordField2 = [alert textFieldAtIndex:2];
passwordField2.clearButtonMode = UITextFieldViewModeWhileEditing;
passwordField2.keyboardType = UIKeyboardTypeNumbersAndPunctuation;
passwordField2.keyboardAppearance = UIKeyboardAppearanceAlert;
passwordField2.autocorrectionType = UITextAutocorrectionTypeNo;
passwordField2.secureTextEntry = YES;
[alert show];
[alert release];
any chance we might see this in the future as well?
Attachments
File | Date | Size |
---|---|---|
register.jpg | 2011-04-15T02:24:12.000+0000 | 51251 |