答案 0 :(得分:1)
目标-C:
[[UIApplication sharedApplication] sendAction:@selector(resignFirstResponder) to:nil from:nil forEvent:nil];
Swift 3.0:
UIApplication.shared.sendAction(#selector(resignFirstResponder), to: nil, from: nil, for: nil)
答案 1 :(得分:0)
[self.view endEditing:YES];
您可以在侧面图标按钮点击事件中写下此行。