开发者

iPhone UItextField add image?

开发者 https://www.devze.com 2023-01-08 20:50 出处:网络
I like to add a picture (png) to a UITextField. Anyone 开发者_如何学运维has any idea? Thanks! BalazsUITextField *myTextField = [[UITextField alloc] init];

I like to add a picture (png) to a UITextField. Anyone 开发者_如何学运维has any idea?

Thanks!

Balazs


UITextField *myTextField = [[UITextField alloc] init];

[myTextField setRightViewMode:UITextFieldViewModeAlways];

myTextField.rightView= [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"image.png"]];


Use UIImageView.

0

精彩评论

暂无评论...
验证码 换一张
取 消