开发者

Why textFieldShouldBeginEditing method cannot be triggered?

开发者 https://www.devze.com 2023-03-27 19:02 出处:网络
I has declared in .h file @interface TextFieldDemoViewController : UIViewController <UITextFieldDelegate>

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

0

精彩评论

暂无评论...
验证码 换一张
取 消