UITextField *tfPhone = [[UITextField alloc] init];
tfPhone.leftView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 15, 40)];
tfPhone.leftViewMode = UITextFieldViewModeAlways;
self.tfPhone = tfPhone;
tfPhone.delegate = self;
tfPhone.backgroundColor = UIColorFromRGBWithAlpha(0xd5d5d5, 1.0);
NSMutableParagraphStyle *style = [tfPhone.defaultTextAttributes[NSParagraphStyleAttributeName] mutableCopy];
style.minimumLineHeight = tfPhone.font.lineHeight - (tfPhone.font.lineHeight - [UIFont systemFontOfSize:14].lineHeight) / 2.0;
tfPhone.attributedPlaceholder = [[NSAttributedString alloc] initWithString:@"请输入您的手机号" attributes:@{NSParagraphStyleAttributeName : style, NSFontAttributeName : [UIFont systemFontOfSize:14], NSForegroundColorAttributeName: UIColorFromRGBWithAlpha(0x878787, 1.0)}];
tfPhone.textColor = UIColorFromRGBWithAlpha(0x878787, 1.0);
[self addSubview:tfPhone];
tfPhone.layer.cornerRadius = 5;
tfPhone.layer.masksToBounds = YES;