我一直在將此屬性作爲未聲明時應該在框架中可用。UIAlertViewStylePlainTextInput未聲明
UIAlertView * alert = [[UIAlertView alloc] initWithTitle:@"Email Alert" message:@"Enter your Email Address" delegate:self cancelButtonTitle:@"Hide" otherButtonTitles:nil];
[alert setAlertViewStyle:UIAlertViewStyleSecureTextInput];
[alert show];
[alert release];
是啊,多數民衆贊成宣佈已經 – redoc01
好我壞了!如果這是由於您使用iOS4,請查看此答案:http://stackoverflow.com/questions/4805637/uitextfield-inside-an-uialertview-not-working-in-ios4-1-and-works-in- 3-0 –