IOS背景view隐藏键盘

将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

posted @ 2013-01-31 10:51  Atlas's blog  阅读(576)  评论(0编辑  收藏  举报