alert中输入单行文本代码
- (void)showAlertViewForInputUserid:(NSString *)username {
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:[@"请先填写账号!" toLocal]
message:nil
delegate:self
cancelButtonTitle:[@"取消" toLocal]
otherButtonTitles:[@"确定" toLocal],nil];
alert.alertViewStyle = UIAlertViewStylePlainTextInput;
UITextField *textField = [alert textFieldAtIndex:0];
textField.text = username;
[alert show];
}
- (void)showAlertViewForInputUserid:(NSString *)username {
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:[@"请先填写账号!" toLocal]
message:nil
delegate:self
cancelButtonTitle:[@"取消" toLocal]
otherButtonTitles:[@"确定" toLocal],nil];
alert.alertViewStyle = UIAlertViewStylePlainTextInput;
UITextField *textField = [alert textFieldAtIndex:0];
textField.text = username;
[alert show];
}