项目中使用了UITableViewController,里面有用到UITextView需要点击键盘外的地方来隐藏我的键盘
自定义一个uitableview,继承UITableView。重写touch事件
– (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { [super touchesBegan:touches withEvent:event]; [[UIApplication sharedApplication].keyWindow endEditing:YES];
}
发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/164203.html原文链接:https://javaforall.cn