iOS 点击屏幕任意空白处,键盘消失

点击屏幕任意空白处,键盘消失的方法:

在这个方法里面实现就好了:

-(void) touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
    [self.teleplayDescription resignFirstResponder];
    [self.teleplayTitle resignFirstResponder];
    [self.teleplayContactPeople resignFirstResponder];
    [self.teleplayContactPeoplePhone resignFirstResponder];
}

comments powered by Disqus