收起键盘

-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{

方法1  [self.view endEditing:YES];

2    [[UIApplication sharedApplication]sendAction:@selector(resignFirstResponder) to:nil from:nil forEvent:nil];

3   [[[UIApplication sharedApplication]keyWindow]endEditing:YES];

}

你可能感兴趣的:(键盘)