Search code examples
objective-cuibuttonuiimageuilabel

uibutton image not shown in simulator


I a trying to do an uibutton with image and text, in xib it looks fine but in the simulator the image is missing, and I don't know why.

xib:

enter image description here

the uibutton settings:

enter image description here

enter image description here

the look in simulator:

enter image description here


Solution

  • Simple way is to take UIView and add UIImageView,UILabel as SubView using interface builder. Then add a transparent button all over the UIView. I hope your problem will be solved.