0

In my application i am using tab bar controller , I have 10 tabs in TabBar Controller and in portrait mode only 4 tabs are visible on screen and remaining 6 tabs are hidden in "More" tab.

The Problem is on Iphone6+(8.3) when i rotate the phone in landscape, the tabs that were hidden in "More" tab comes out and are visible on screen, in such a way that 7 tabs are visible on screen and remaining 3 are hidden in "More" tab.

Now i want some help so that when i rotate the phone to landscape, only 4 tabs remain on screen (as in portrait mode) and other 6 tabs remain hidden in "More" tab.

This problem is only occuring on iphone 6+ that have IOS 8.3, on other iphones including iphone6+ (IOS less then 8.3), 4 tabs are visible on screen and the other 6 tabs remain hidden in "More" tab in portrait and landscape mode. One more thing if i remove the launch images for iphone6 and iphone6+ then again every thing is fine.

Abuzar Amin
  • 1,981
  • 1
  • 19
  • 33

1 Answers1

0

You may override the default behaviour of the UITabBarController by setting the property @property(nonatomic,copy) NSArray *items; // get/set visible UITabBarItems. default is nil. changes not animated. shown in order

You can also customise the default layout :

/*
 Default is UITabBarItemPositioningAutomatic. The tab bar items fill horizontally
 for the iPhone user interface idiom, and are centered with a default width and 
 inter-item spacing (customizable with the itemWidth and itemSpacing
 properties) for the iPad idiom. When the tab bar is owned by a UITabBarController
 further heuristics may determine the positioning for UITabBarItemPositioningAutomatic.
    Use UITabBarItemPositioningFill to force the items to fill horizontally.
    Use UITabBarItemPositioningCenter to force the items to center with a default
 width (or the itemWidth, if set).
 */
@property(nonatomic) UITabBarItemPositioning itemPositioning NS_AVAILABLE_IOS(7_0) UI_APPEARANCE_SELECTOR;

/*
 Set the itemWidth to a positive value to be used as the width for tab bar items
 when they are positioned as a centered group (as opposed to filling the tab bar).
 Default of 0 or values less than 0 will be interpreted as a system-defined width.
 */
@property(nonatomic) CGFloat itemWidth NS_AVAILABLE_IOS(7_0) UI_APPEARANCE_SELECTOR;

/*
 Set the itemSpacing to a positive value to be used between tab bar items
 when they are positioned as a centered group.
 Default of 0 or values less than 0 will be interpreted as a system-defined spacing.
 */
@property(nonatomic) CGFloat itemSpacing NS_AVAILABLE_IOS(7_0) UI_APPEARANCE_SELECTOR;
Loegic
  • 3,390
  • 20
  • 33