Привет Я использую приведенный ниже код, который включает в себя alertView, содержащий поле UserID и Password.Как получить доступ к secureTextEntry для дальнейшего использования?
эти Идентификатор_пользователя и пароль текстовое поле, я сделал поле пароля, как безопасным, но когда я позже хочу получить доступ к данным, введенным в поле пароля, его не показывая значения в поле пароля ..
Моего код
self.loginPassword = [[ UIAlertView alloc] initWithTitle:@"Please Login" message:@"Enter Valid UserID and Password\n\n\n\n" delegate:self cancelButtonTitle:@"OK" otherButtonTitles:@"Cancel", nil];
//[self.loginPassword setAlertViewStyle:UIAlertViewStyleLoginAndPasswordInput];
self.userIDText = [[UITextField alloc] initWithFrame:CGRectMake(12.0, 80.0, 260.0, 25.0)];
[email protected]"";
[self.userIDText setBackgroundColor:[UIColor whiteColor]];
[self.userIDText setKeyboardAppearance:UIKeyboardAppearanceAlert];
[self.userIDText setAutocorrectionType:UITextAutocorrectionTypeNo];
[self.userIDText setTextAlignment:UITextAlignmentLeft];
self.passwordField = [[UITextField alloc] initWithFrame:CGRectMake(12.0,115.0, 260.0, 25.0)];
[email protected]"";
[self.passwordField setBackgroundColor:[UIColor whiteColor]];
[self.passwordField setKeyboardAppearance:UIKeyboardAppearanceAlert];
[self.passwordField setAutocorrectionType:UITextAutocorrectionTypeNo];
[self.passwordField setTextAlignment:UITextAlignmentLeft];
[self.loginPassword addSubview:self.userIDText];
[self.loginPassword addSubview:self.passwordField];
self.passwordField.secureTextEntry = YES;
[self.loginPassword setTag:2];
[self.loginPassword show];
[self.loginPassword release];
пожалуйста предложить мне решение ..
Почему вы создаете свои собственные текстовые поля вместо того, чтобы использовать стиль 'UIAlertViewStyleLoginAndPasswordInput'? – rmaddy
no iOS 4.3 не поддерживает это. Я создаю subView для alertView – Raju