.h文件
加入UITextFieldDelegate委托;
定义两个UITextField:
{
UITextField *textField1;
UITextField *textField2;
}
@property(nonatomic,retain)
NSObject<UITextFieldDelegate> *delegate;
@property (strong,
nonatomic) UITextField *textField1;
@property (strong,
nonatomic) UITextField *textField2;
.m文件
@synthesize textField1;
@synthesize textField2;
加入UITextFieldDelegate委托类容
- (void)viewDidLoad
{
textField1........//textField1初始化,及其他处......
阅读全文