开发者

Icon In a button -xcode view controller [closed]

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜