Icon In a button -xcode view controller [closed]
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
精彩评论