有没有办法调整的UITabBar按钮项目的宽度以适合屏幕超过5个按钮? [英] Is there a way to adjust the width of UITabBar button items to fit more than 5 buttons on the screen?
问题描述
我的按钮显得捉襟见肘,尤其是在横向方向。我无法找到一个属性来调整无论是在的UITabBar,UITabBarViewController,或在UITabBarItem的自己。 (当然,你的答案是拿到一个iPad ......但是,这并不解决手机的需求。)
My buttons seem stretched, especially in landscape orientation. I can't find a property to adjust either on the UITabBar, UITabBarViewController, or on the UITabBarItem's themselves. (Of course, one answer would be to get an iPad...but that doesn't solve the need for a phone.)
例如,考虑这个简单的标签栏为例 - 如果我只可以设置标签栏自动收缩随着越来越多的按钮添加,或手动调节宽度以适应他们所有的标签栏上,我会很高兴。
For example, consider this simple Tab Bar Example - if I only could set the tab bar to auto-shrink as more buttons are added, or manually adjust the width to fit them all on the tab bar, I would be happy.
推荐答案
这是不可能使用的UITabBar五个以上可见按钮。你必须编写自己的组件。
It is not possible to use the UITabbar with more than five visible buttons. You've got to write your own component.
在 significantpixels.com / iPhone的标签栏下面的教训从现实是哪些详细解释了如何从一个UX点设计你的标签栏标签栏的文章。而神奇的数字标签为五;)
Here at significantpixels.com / The iPhone Tab Bar Lessons From Reality is an article about the tab bar which explains in detail how to design your tab bar from a UX point of view. And the magic number of tabs is five ;)
这篇关于有没有办法调整的UITabBar按钮项目的宽度以适合屏幕超过5个按钮?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!