点步

导航

常用的

键盘退出两种方式 
[self.textField resignFirstResponder];
    [self endEditing:YES];

添加动画
    [UIView animateWithDuration:0.25 animations:^{
        //如果有需要,就去重新布局
        [self layoutIfNeeded];
    }];
 [self.textField resignFirstResponder];
    [self endEditing:YES];
    self.textFieldRigthCon.constant = 0;
    [UIView animateWithDuration:0.25 animations:^{
        //如果有需要,就去重新布局
        [self layoutIfNeeded];
    }];
//设置leftView与left的显示模式
    self.textField.leftView = leftView;
    self.textField.leftViewMode = UITextFieldViewModeAlways;

否则不显示效果
 
//设置圆角
    self.textField.layer.cornerRadius = 8;
    self.textField.layer.masksToBounds = YES;

//设置边线宽度及颜色
    self.textField.layer.borderWidth = 3;
   self.textField.layer.borderColor = [UIColor orangeColor].CGColor;

 

posted on 2015-11-07 19:28  点步  阅读(139)  评论(0编辑  收藏  举报