I subclassed a UITextField and wish to get a method called when it becomes first responder or resigns first responder. How can I achieve this?
Just override becomeFirstResponder to call your method. Something like,
    - (BOOL)becomeFirstResponder
    {
        BOOL returnValue = [super becomeFirstResponder];
        if (returnValue) {
            [self method];
        }
        return returnValue;
    }
See the docs here for more info on responder methods: http://developer.apple.com/library/ios/#DOCUMENTATION/UIKit/Reference/UIResponder_Class/Reference/Reference.html#//apple_ref/occ/cl/UIResponder
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With