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 @   Atlas's blog  阅读(578)  评论(0编辑  收藏  举报
努力加载评论中...
点击右上角即可分享
微信分享提示