开发者

Icon In a button -xcode view controller [closed]

开发者 https://www.devze.com 2022-12-12 05:33 出处:网络
It's difficult to tell what 开发者_如何学Cis being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical andcannot be reasonably answered in its current form.
It's difficult to tell what 开发者_如何学Cis being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 10 years ago.

i created a button where i want to place a icon/image inside the button


Solution:

double click on the .xib file now select the button and click on tools->Identity inspector there it will indicate the class is inherited from UIButton below select the image option for button , Tools ->Attribute Inspector give the name for the button and also the icon name

Make sure you have included the icon in ur project


you can use custom button and use any view you want for it


Have a look at these two methods in UIButton:

- (void)setImage:(UIImage *)image forState:(UIControlState)state
- (void)setBackgroundImage:(UIImage *)image forState:(UIControlState)state
0

精彩评论

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