- (void)setTextFieldLeftView:(UITextField *)textField leftWidth:(CGFloat)leftWidth {
CGRect frame = textField.frame;
frame.size.width = leftWidth;
UIView *leftview = [[UIView alloc] initWithFrame:frame];
textField.leftViewMode = UITextFieldViewModeAlways;
textField.leftView = leftview;
}
网友评论