将view的class改成ViewController,ViewContrlloer继承于View,拥有View的所有属性且多了对于事件的处理,所以可以在事件中处理。

-(IBAction)backgroundTap:(id)sender{
    [nameField resignFirstResponder];
    [numberField resignFirstResponder];
}

 

 

REFERENCES:http://www.cnblogs.com/minglz/archive/2012/11/17/2770848.html

相关文章:

  • 2022-12-23
  • 2021-05-31
  • 2021-11-30
  • 2021-06-21
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-07
猜你喜欢
  • 2021-09-05
  • 2021-06-18
  • 2021-09-03
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-28
相关资源
相似解决方案