iOS ViewController點擊空白處收起鍵盤

點擊ViewController空白處時收起鍵盤,能夠經過系統的touchesBegan方法實現,具體以下:objective-c Objective-C 版swift - (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event { [self.view endEditing:YES]; } 1 2 3 1
相關文章
相關標籤/搜索