UITextField

通过UITextField的代理方法能够监听键盘最右下角按钮的点击

1.成为UITextField的代理
self.textField.delegate = self;

2.遵守UITextFieldDelegate协议,实现代理方法
- (BOOL)textFieldShouldReturn:(UITextField *)textField;

 

在UITextField左边放一个view
self.textField.leftView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 8, 0)];
self.textField.leftViewMode = UITextFieldViewModeAlways;

posted @ 2017-05-26 14:05  iFat  阅读(95)  评论(0编辑  收藏  举报