点击tableview的时候隐藏键盘
- (void)viewDidLoad {
[super viewDidLoad];
UITapGestureRecognizer *tapGes = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(hideKeyboard)];
tapGes.cancelsTouchesInView = false;
[self.tableView addGestureRecognizer:tapGes];
}
- (void)hideKeyboard
{
[self.textfieldUsername resignFirstResponder];
}