我正在使用文本输入创建一个UIAlertView
。
UIAlertView *alertView=[[UIAlertView alloc]initWithTitle:@"Save" message:@"Please Enter the Name of PDF" delegate:self cancelButtonTitle:@"Cancel" otherButtonTitles:@"OK", nil];
[alertView setAlertViewStyle:UIAlertViewStylePlainTextInput]
当UITextField为空时,我想通过委托函数禁用OK按钮
- (BOOL)alertViewShouldEnableFirstOtherButton:(UIAlertView *)alertView
{
return NO;
}
当用户开始在文本框中输入内容时,OK按钮应该变为可用状态。
UIAlertView
弹出,就没有取消和关闭它的按钮了吗? - Desdenova