返回键 隐藏、、收起键盘textView|textField

 /**

     隐藏 返回键 的做法,将title置为空

     */

    self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc]initWithTitle:@" " style:UIBarButtonItemStylePlain target:nil action:nil];

 

//收起键盘

-(void)touchesEnded:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event{

    [self.textView endEditing:YES];

}

-(BOOL)textFieldShouldReturn:(UITextField *)textField{

    return self.textView.resignFirstResponder;

}

你可能感兴趣的:(返回键 隐藏、、收起键盘textView|textField)