iOS之UITextField右边设置图片

一:UITextField右边设置图片

相关链接地址:https://www.jianshu.com/p/93a02f813b62

1

UIImageView*rightView = [[UIImageViewalloc]init]; rightView.image = [UIImageimageNamed:imageName]; rightView.size =CGSizeMake(40,40); rightView.contentMode =UIViewContentModeCenter; textField.rightView = rightView; textField.rightViewMode =UITextFieldViewModeAlways;

你可能感兴趣的:(iOS之UITextField右边设置图片)