iosswiftstoryboarduitabbaritemlandscape-portrait

TabBar image size in landscape mode


I am working on application which supports both Portrait and Landscape mode. I am using default TabBarController in Storyboard.

NOTE: I am adding custom offset on images

In Portrait mode the image size of tabbarItems are looking well nice. But when i am rotating my device to landscape mode, the TabbarItems images are looking too small

How can I resolve this so that i can have the bigger size for landscape mode.

Here are the screenshots for both portrait and landscape mode.

Portrait Landscape

Any better approach for tab bar in landscape mode ?

Thanks!

#Edit 1 I added custom offset for landscape mode (all are having a negative value) and the size increased. but on tapping the size is increasing (on each tap)

#Edit 2 I removed left and right inset from landscape mode and the increasing image size is fixed but the size is again decreased.

Any Suggestion about what's happening ?


Solution

  • I just ran into this, you need to set the tabbarItem's landscapeImagePhoneInsets property as well.