YIem`s Blog -心比天高命比纸薄-链接找不到的请在站内搜索内容!

iOS键盘回收-按return键盘回收-或者跳入下一个UITextFielf

iOS键盘回收-按return键盘回收-或者跳入下一个UITextFielf

#import "ViewController.h"

@interface ViewController ()<UITextFieldDelegate>
@property (nonatomic, retain) UITextField *field1;
@property (nonatomic, retain) UITextField *field2;
@end

@implementation ViewController

self.field1 = [[UITextField alloc]init];

self.field1.frame = CGRectMake(label1.frame.origin.x + label1.frame.size.width + 30, label1.frame.origin.y, 200, label1.frame.size.height);
self.field1.backgroundColor = [UIColor cyanColor];
self.field1.placeholder = @"请输入Emial/手机/用户名";
// 键盘回收
self.field1.delegate = self;
[self.view addSubview:self.field1];

self.field2 = [[UITextField alloc] init];
self.field2.frame = CGRectMake(self.field1.frame.origin.x, self.field1.frame.origin.y + self.field1.frame.size.height + 20,self.field1.frame.size.width, self.field1.frame.size.height);
self.field2.backgroundColor = [UIColor cyanColor];
self.field2.placeholder = @"请输入密码";
self.field2.secureTextEntry = YES;
// 键盘回收  YIem博客
self.field2.delegate = self;
[self.view addSubview:self.field2];




}
// 键盘回收



当前页面是本站的「Google AMP」版。查看和发表评论请点击:完整版 »