UIToolbar has a nice option for resizing (self.navigationController.toolbar.frame) I'm wondering if anyone knows of a way to change the height of a UIBarButtonItem?
I have a custom toolbar with a height of 117 pixels and so far I haven't found a way of modifying the buttons on the toolbar. Also I need it to be a toolbar because the displayed view gets covered with another animated view (cut scene style) while I setup assets in the first view and the toolbar needs to stay on top during all of it.
Make this simple three steps
1 Write property:
2 Synthesize:
3 Write implementation:
Now when you have uibutton on uibarbuttomitem you can define all property for uibutton like, image, action etc.
I've actually run into this myself and the only thing I could come up with was leveraging initWithCustomView and passing in a UIButton with a defined frame.
Otherwise UIBarButtonItem only has a width property that can be set but unfortunately not a height property. Another nifty thing I've done with initWithCustomView is to pass in a toolbar with a button and other things like activity indicators. Hope this helps.
create a
UIButton
with your preferred frame and image and target and selector and etc. then useUIBarButtonItem
'sinitWithCustomView:
method and use the UIButton as the customView.