【问题标题】:UISegmentedControl different behavior deployed on iOS 5 & iOS 5.1UISegmentedControl 在 iOS 5 和 iOS 5.1 上部署的不同行为
【发布时间】:2012-05-22 18:47:35
【问题描述】:

iOS5

 NONE    |    Center Blur    |     B/W

iOS5.1

 NONE    | Center Blur       |     B/W

Center Blur 布局在 Target iOS 5 上很好。但是,在 iOS 5.1 上,标题布局是连线的。 我查看了 UISegmentedControl 头文件,UISegmentedControlStyleBezeled 声称已弃用。

我需要找到一些解决方案来替换当前的实现。我需要在分段控件中放置很多 bg img 吗?有人有什么好主意吗?

【问题讨论】:

    标签: iphone ios ios5


    【解决方案1】:

    正如您所注意到的,即使文档没有显示,UISegmentedControlStyleBezeled 已被弃用,因此不应再使用它。这是一个已知问题 (http://openradar.appspot.com/11038316),在回归到 5.0 时,它起作用了。

    如果您想要类似的设计,是的,您应该自己经历编码的痛苦。或者作为一种解决方法,正如@Hlung 所说的here,您可以使用增加高度的UISegmentedControlStyleBar

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2011-06-13
      • 1970-01-01
      • 2012-02-25
      • 2011-12-08
      • 2014-07-02
      • 2013-01-31
      • 2015-09-10
      相关资源
      最近更新 更多