No delegation is required, here is one-line:
- (void)viewDidLoad { [textField addTarget:textField action:@selector(resignFirstResponder) forControlEvents:UIControlEventEditingDidEndOnExit]; }
Unfortunately, you cannot directly do this in your storyboard (you cannot connect actions to the control that emits them on the Storyboard), but you can do this through an intermediary action.
mxcl Jan 08 2018-11-14T00: 00Z
source share