I has declared in .h file
@interface TextFieldDemoViewController : UIViewController <UITextFieldDelegate>
and implements this protocol method
- (BOOL)textFieldShouldBeginEditing:(UITextField *)textField{
NSLog(@"OK");
return NO;
}
Build and click a textfield, but nothing happen. Did I miss something?
OK, I has resolved 开发者_运维问答it: Connect textfield's Outlet 'delegate' to File's owner in IB
Connect textfield's Outlet 'delegate' to File's owner in IB
精彩评论