我应该使用什么代替iOS5.1中不推荐使用的UISegmentedControlStyleBezeled? [英] What should I use instead of the deprecated UISegmentedControlStyleBezeled in iOS5.1?

查看:267
本文介绍了我应该使用什么代替iOS5.1中不推荐使用的UISegmentedControlStyleBezeled?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

构建我的应用程序时会出现警告,表明我的UISegmentedControlStyleBezeled已弃用。没有其他类型的UISegmentedControl看起来接近Bezeled的一个,所以我不知道我可以使用什么而不是它。我需要类似UISegmentedControlStyleBar但更高的高度。

There are warnings when I build my app indicating my UISegmentedControlStyleBezeled is deprecated. There are no other types of UISegmentedControl that looks close to the Bezeled one so I don't know what I can use instead of it. I need something like UISegmentedControlStyleBar but with more height.

此外,查看UISegmentedControl.h显示了这个...

Moreover, looking in UISegmentedControl.h reveals this...

typedef enum {
    UISegmentedControlStylePlain,     // large plain
    UISegmentedControlStyleBordered,  // large bordered
    UISegmentedControlStyleBar,       // small button/nav bar style. tintable
    UISegmentedControlStyleBezeled,   // DEPRECATED. Do not use this style.
} UISegmentedControlStyle;


推荐答案

目前,我使用的工作是使用UISegmentedControlStyleBar并增加其帧高。您可能还希望保持相同的中心,以避免它向下扩展。

For the moment, the work around I use is using UISegmentedControlStyleBar and increase its frame height. You might also want to keep the same center as well to avoid it expanding down.

这篇关于我应该使用什么代替iOS5.1中不推荐使用的UISegmentedControlStyleBezeled?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆