Your custom UITextField
class needs to indicate that it conforms to the UITextFieldDelegate
protocol.
@interface MyCustomTextField : UITextField <UITextFieldDelegate>
Also make sure that your firstNameTextField
property is declared as:
@property (nonatomic) MyCustomTextField *firstNameTextField;