[英]UISegmentedControl with 5-6 segments
In our application we are showing the segmented control with dynamic segments. 在我们的应用程序中,我们展示了带有动态段的分段控件。
If number of segments is 2-3 we have no issue, but if number of segments is 5 or more than that then the text in segment is not readable. 如果段数是2-3,则没有问题,但是如果段数是5或大于5,则段中的文本不可读。
See the above image. 参见上图。
So, what is the alternate way to resolve this issue? 那么,解决此问题的另一种方法是什么?
There are a couple of solutions. 有两种解决方案。
Which one fits best depends on your app, and what is the actual use of those segments. 哪一个最适合取决于您的应用,以及这些细分的实际用途是什么。
It's hard to answer this question on a general basis. 总体上很难回答这个问题。 Apple's Human Interface Guidlines may be a good reference for this kind of issues. 苹果公司的人机界面指南可能是此类问题的很好参考。
最好的解决办法是,增加ScrollView
在您的视图控制器 ,并添加UISegmentController
到UIScrollView
,给你的部分按钮的修复尺寸和改变的大小UISegmentController
基础上按钮的数量总 ,改变的内容大小UIScrollView
的基础UISegmentController
。
try setting font size for the test to be smaller, that ways, the text will be more visible. 尝试将测试的字体大小设置为较小,这样文本将更加可见。 However, if your number of segments keep increasing, that wouldn't be a solution 但是,如果您细分的数量持续增加,那将不是解决方案
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.