Wednesday, 21 August 2013

TextField on AlertView

TextField on AlertView

UITextField *txtNewPassword = [[UITextField alloc]
initWithFrame:secondTextFldRect];
txtNewPassword.delegate = self;
txtNewPassword.text = @"";
txtNewPassword.clearButtonMode = UITextFieldViewModeWhileEditing;
txtNewPassword.borderStyle = UITextBorderStyleRoundedRect;
txtNewPassword.autocapitalizationType =
UITextAutocapitalizationTypeNone;
txtNewPassword.tag = kNewPasswordTxtFldTag;
[txtNewPassword setBackgroundColor:[UIColor whiteColor]];
[txtNewPassword setKeyboardAppearance:UIKeyboardAppearanceAlert];
[txtNewPassword setAutocorrectionType:UITextAutocorrectionTypeNo];
[txtNewPassword setPlaceholder:@"New password"];
[txtNewPassword setTextAlignment:UITextAlignmentLeft];
[txtNewPassword setSecureTextEntry:YES];
[alert addSubview:txtNewPassword];
[txtNewPassword release];
Working with Xcode 5 with IOS 7 , textField not Shown

No comments:

Post a Comment