UITabBar Showing More Icons Instead of “More” Option

后端 未结 1 1275
难免孤独
难免孤独 2021-01-28 00:36

I\'m currently attempting to use the UITabBar for an iOS app that contains 7 tabBar Items.

When I use the storyboard, I am able to achieve all

相关标签:
1条回答
  • 2021-01-28 01:05

    By design you are limited to 5, from apple docs

    If you add more than five items to the viewControllers property, the tab bar controller automatically inserts a special view controller (called the More view controller) to handle the display of the additional items. The More view controller provides a custom interface that lists the additional view controllers in a table, which can expand to accommodate any number of view controllers. The More view controller cannot be customized or selected and does not appear in any of the view controller lists managed by the tab bar controller. It appears automatically when it is needed and is separate from your custom content. You can get a reference to it though by accessing the moreNavigationController property of UITabBarController.

    It just not recommended , but if you insist you will need to use a library or perhaps use a tool bar and add many UIBarButtonItems to it.

    0 讨论(0)
提交回复
热议问题