开发者

iPhone UItextField add image?

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜