0

В моем приложении я использую контроллер панели вкладок, у меня есть 10 вкладок в TabBar Controller, и в портретном режиме на экране видны только 4 вкладки и остальные 6 вкладок скрыты на вкладке «Дополнительно».В TabBarController вкладки «Больше» выходят в ландшафтном режиме на iphone 6+ IOS 8.3

Проблема связана с Iphone6 ​​+ (8.3) при повороте телефона в ландшафте, вкладки, которые были скрыты на вкладке «Дополнительно», отображаются и отображаются на экране таким образом, что на вкладке отображаются 7 вкладок и остальные 3 скрыты на вкладке «Дополнительно».

Теперь мне нужна помощь, так что, когда я поворачиваю телефон на пейзаж, на экране остаются только 4 вкладки (как в портретном режиме), а остальные 6 вкладок остаются скрытыми на вкладке «Дополнительно».

Эта проблема возникает только на iphone 6+ с IOS 8.3, на других iphones, включая iphone6 ​​+ (IOS меньше 8.3), на вкладке видны 4 вкладки, а остальные 6 вкладок остаются скрытыми на вкладке «Дополнительно» в портрете и ландшафтный режим. Еще одна вещь, если я удаляю снимки запуска для iphone6 ​​и iphone6 ​​+, тогда снова все прекрасно.

ответ

0

Вы можете переопределить поведение по умолчанию UITabBarController, установив свойство @property(nonatomic,copy) NSArray *items; // get/set visible UITabBarItems. default is nil. changes not animated. shown in order

Вы также можете настроить расположение по умолчанию:

/* 
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;