如何用Apple的新语言实现它?
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { for (UIView *view in self.view.subviews) [view resignFirstResponder]; }
override func touchesBegan(touches: NSSet,withEvent event: UIEvent) { super.touchesBegan(touches,withEvent: event) self.view.resignFirstResponder() }
你可能会去:
原文链接:https://www.f2er.com/swift/319785.htmlself.view.endEditing(true)