How Can i put more of 5 tabs in a Tab Bar Controller?

谁说我不能喝 提交于 2019-12-11 12:04:08

问题


:D

i'm have a storyboard with a TabBarController but when i do the relationship with my others seven view controllers in mi tab bar appears a "more" Tab, How can i put this seven tabs in one tabbar?

I´ll have to do manually? with a tabbarcontroller class? or implementing Tabbar Delegate in a uiviewcontroller, But i dont have any idea how to do this.

Thank You Soo much! Please Help Me.

Thanks Again.


回答1:


I believe Apple actively discourages people from doing this in their apps, and so do I. It is never done in the iOS itself, and I have never seen it in any third-party apps either, so users will probably be confused.

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. For the most part, 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.

Also refer this link for a possible workaround!




回答2:


You can use any open source custom UITabbarControler or can create your own. As created in this open source code. JFTabBarController a custom tabbar controller on Cocoa Controls



来源:https://stackoverflow.com/questions/18671264/how-can-i-put-more-of-5-tabs-in-a-tab-bar-controller

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!