David Liu
David Liu

Reputation: 17604

UIBarButtonItem widths are different between iPhone and iPad

The following screenshot are taken from iTunes U app. As we can see the widths of UIBarButtonItem are quite different. Specifically, the widths are smaller on iPhone.

UIBarButtonItem on iPhone

UIBarButtonItem on iPad

The question is how to customize width of UIBarButtonItem. I tried to set width, it didn't work and always kept width of 44.

Upvotes: 1

Views: 302

Answers (1)

Ben M
Ben M

Reputation: 2475

If you want to manipulate the size of a UIBarButtonItem you need to use a custom view. Build a view with your image and the size you want and use [UIBarButtonItem initWithCustomView:]

Upvotes: 1

Related Questions