iOS 结束编辑

方法1

- (void)hiddenKeyboard
{
  [textfield  resignFirstResponder];
  [textview resignFirstResponder];
}

方法2

- (void)hiddenKeyboard
{
  [self.view endEditing:YES];
}

方法3

- (void)hiddenKeyboard
{
  [[[UIApplication sharedApplication] keyWindow] endEditing:YES];
}

你可能感兴趣的:(iOS 结束编辑)