今天就给你们分享个简单的输入文本框吧!!!欢迎你们给意见,后续精彩继续更新中。it
UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@"标题" message:nilio
preferredStyle:UIAlertControllerStyleAlert];im
_progressText.placeholder = @"占位符";分享
[alertController addTextFieldWithConfigurationHandler:^(UITextField *textField) {animate
textField.placeholder = _progressText.placeholder;handler
textField.keyboardType = UIKeyboardTypeDefault;co
_progressText = textField;let
}];return
UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleCancel handler:^(UIAlertAction *action) {message
return ;
}];
UIAlertAction *otherAction = [UIAlertAction actionWithTitle:@"肯定" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {
//要作的事情
}];
[alertController addAction:cancelAction];
[alertController addAction:otherAction];
[self presentViewController:alertController animated:YES completion:nil];