I have a viewController
that is presented modally, and when the cancel leftBarButtonItem
is pressed I want a certain property
to be set to nil
before the UITextFieldDelegate
method textFieldShouldEndEditing
gets called.
I was able to do this when I was using unwindSegue
from storyboard, using prepareForSegue
, but when I set the target-action
for the leftBarButtonItem
programmatically, textFieldShouldEndEditing
gets called before the action method gets called for the leftBarButtonItem
. Does anyone know how to call a method before textFieldShouldEndEditing
gets called? Thanks!