1 //UIAlertView的代理方法(创建UIAlertView之后,copy此代理方法即可)
 2 
 3 -  (BOOL)alertViewShouldEnableFirstOtherButton:(UIAlertView *)alertView{
 4 
 5   //1.取出输入框中的文字
 6 
 7   NSString *text = [alertView textFieldAtIndex:0].text;
 8 
 9   //2.如果输入框为空
10 
11   if(![text length]){
12 
13     //不可点击
14 
15     return NO;
16 
17   }else{
18 
19     return YES;
20 
21   }
22 
23 }

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-11-17
  • 2021-11-17
  • 2021-11-13
  • 2022-12-23
  • 2021-06-19
猜你喜欢
  • 2021-07-21
  • 2022-12-23
  • 2021-10-08
  • 2021-11-29
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案