iOS keyboard return key tapped

When I have the iOS keyboard's return key set to display as "Done", how do I intercept the keystroke so that I know the user tapped the return key?

Answered by PBK in 229550022

No matter what you label that key, when a user taps it there is a call to the method:


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


see:

https://developer.apple.com/reference/uikit/uitextfielddelegate?language=objc

Accepted Answer

No matter what you label that key, when a user taps it there is a call to the method:


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


see:

https://developer.apple.com/reference/uikit/uitextfielddelegate?language=objc

iOS keyboard return key tapped
 
 
Q