UIView *phoneView = [[UIView alloc]initWithFrame:CGRectMake(0, 0, 18, _phoneTextField.height)]; UIImageView *phoneImage = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"login_phone"]]; phoneImage.frame = CGRectMake(0, 10, 18, 23); [phoneView addSubview:phoneImage]; self.phoneLeftView = phoneImage; _phoneTextField.leftView = phoneView; _phoneTextField.leftViewMode = UITextFieldViewModeAlways;
原创声明,本文系作者授权云+社区发表,未经许可,不得转载。
如有侵权,请联系 yunjia_community@tencent.com 删除。
我来说两句