需要效果
代码实现
//给一个frame,可以限制图片的大小。不给也行,会显示图片原本大小。
UIImageView *leftImgV = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 30, 30)];
leftImgV.image = [UIImage imageNamed:@"currOrder_btn_delete_pre"];
self.chongzhiTextField.leftView = leftImgV;
self.chongzhiTextField.leftViewMode = UITextFieldViewModeAlways;