steipete mentioned this in the comments but I feel like it needs to be an answer now. As of iOS 5, you can use the UIBarButtonItem initializer:
- initWithImage:landscapeImagePhone:style:target:action:
Just set landscapeImagePhone
image to a smaller version of the image you want resized in landscape.
After some testing, I noticed that the iPhone does shrink down the navigation bar and therefore the UIBarButtonItems on the navigation bar but the iPhone 6 Plus does not. The 6 Plus seems to keep the navigation bar at a height of 44px, whereas the regular iPhone shrinks it down to 32px. Because of this, the 6 Plus also does not use the landscapeImagePhone
in landscape.
I tested this by not just using a smaller size image for landscapeImagePhone
, but a completely different image. The image never changed on the 6 Plus.
However, be aware of the following as of iOS 9.2 on the iPhone 6 Plus:
The Apple documentation for this initializer states that landscapeImagePhone
is:
The image to be used for the item in landscape bars in the UIUserInterfaceIdiomPhone idiom.
As of iOS 9.2, the 6 Plus does report as UIUserInterfaceIdiomPhone
in both portrait and landscape. Before, the 6 Plus used to be UIUserInterfaceIdiomUnspecified
. I'm not exactly sure when that was updated. But, since it is now UIUserInterfaceIdiomPhone
, according to the documentation, the landscapeImagePhone
should apply to the 6 Plus as well.
So maybe it doesn't rely so much on the UIUserInterfaceIdiom as much as it does on the height of the navigation bar. I do not know for sure. Just note that this inconsistency may be "fixed" in the future and therefore cause a different behavior.