开发者

How to do UITextField's leftView in Interface Builder?

开发者 https://www.devze.com 2022-12-16 13:45 出处:网络
Looking at UITextField item in Interface Builder, cannot see any way to set leftView property. Would like the put there an icon to show user that this is place for text input.

Looking at UITextField item in Interface Builder, cannot see any way to set leftView property. Would like the put there an icon to show user that this is place for text input.

The overlay view displayed on the left side of the text field.
@property(nonatomic, retain) UIView *leftView

Can开发者_开发知识库 it be set using IB at all?


You mean UITextField? It looks like you cannot do that in IB. Instead, somewhere in your view controller's -viewDidLoad set both leftView and leftViewMode properties.

0

精彩评论

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