Reputation: 4716
I have a UIBarButtonItem
that does not take the picture
I have a toolbar with a button UIBarButtonItem
above, connected via IBOutlet
. The image that I put you do not see.
My code:-
@interface ViewController : {
IBOutlet UIToolbar *toolBar;
IBOutlet UIBarButtonItem * myBackButton;
IBOutlet UIBarButtonItem * myReloadButton;
IBOutlet UIBarButtonItem * myHomeButton;
IBOutlet UIBarButtonItem * myListButton;
IBOutlet UIBarButtonItem * myCalendarbutton;//the problem is this
}
the button is connect by IB
but does not take the picture.
this is the image
this is the IB
Upvotes: 0
Views: 1053
Reputation: 552
UIBarButtonItem
will not allow you to put background image.
Try to use normal UIButton
and try to use image as a background to the UIButton
.
Get the action of the UIButton
and you will get your desired output.
Upvotes: 1