【发布时间】:2013-10-08 21:58:13
【问题描述】:
我想为 UISegmentedControl 提供以下方面:
注意灰色背景视图,以及分段控件非选中项的白色背景。
但是,如果我给我的 UISegmentedControl 一个白色背景,我会得到以下信息:
注意 UISegmentedControl 周围的白色方角。我应该怎么做才能避免那个方角?
提前谢谢你,
编辑:如果我改变 UISegmentedControl 层的圆角半径,如 onegray 所建议的,结果会更好,但并不完美(注意右边的白线):
【问题讨论】:
-
可以设置
segmented.backgroundColor=[UIColor clearColor]; -
@Viruss mca:感谢您的评论,但在这种情况下,“Tratadas”背后的背景显示为灰色,而不是白色。
-
您也可以使用两个 UIButton 代替 UISegmentedControl 作为替代解决方案。
标签: iphone ios7 uisegmentedcontrol