首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >UIButtonTypeSystem on iOS 6

UIButtonTypeSystem on iOS 6
EN

Stack Overflow用户
提问于 2014-05-05 18:57:10
回答 2查看 1.1K关注 0票数 0

以下内容在使用Xcode 5和最新编译器的iOS 6上有效吗?

代码语言:javascript
复制
UIButton *button = [UIButton buttonWithType:UIButtonTypeSystem];

如果我没有弄错的话,UIButtonTypeSystem似乎和UIButtonTypeRoundedRect在iOS 6以及iOS 7上的决定是一样的,但我可能误解了这一点。

代码语言:javascript
复制
typedef NS_ENUM(NSInteger, UIButtonType) {
    UIButtonTypeCustom = 0,                         // no button type
    UIButtonTypeSystem NS_ENUM_AVAILABLE_IOS(7_0),  // standard system button

    UIButtonTypeDetailDisclosure,
    UIButtonTypeInfoLight,
    UIButtonTypeInfoDark,
    UIButtonTypeContactAdd,

    UIButtonTypeRoundedRect = UIButtonTypeSystem,   // Deprecated, use UIButtonTypeSystem instead
};
EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2014-05-05 18:59:14

如果您需要支持iOS 6,那么只需使用UIButtonTypeRoundedRect而不是UIButtonTypeSystem。然后,它将在iOS 6和7下工作。

票数 1
EN

Stack Overflow用户

发布于 2014-05-05 19:14:40

医生是你的朋友。在UIButtonTypeSystem下搜索,我们发现:

UIButtonTypeSystem系统样式按钮,如导航栏和工具栏中显示的按钮。可在iOS 7.0和更高版本的中使用。

所以不,UIButtonTypeSystem在iOS 7中是新的。旧的操作系统版本的结果将是未知的。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/23479722

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档