枚举enum
来源:互联网 发布:sql 遍历select结果 编辑:程序博客网 时间:2024/06/06 12:58
例如UITableViewCellStyle,如下:
typedef enum { UITableViewCellStyleDefault, UITableViewCellStyleValue1, UITableViewCellStyleValue2, UITableViewCellStyleSubtitle} UITableViewCellStyle;
也可以如下定义:
typedef enum { UITableViewCellStyleDefault, UITableViewCellStyleValue1, UITableViewCellStyleValue2, UITableViewCellStyleSubtitle};typedef NSInteger UITableViewCellStyle;
新式的枚举定义如下:
typedef NS_ENUM(NSInteger, UITableViewCellStyle) { UITableViewCellStyleDefault, UITableViewCellStyleValue1, UITableViewCellStyleValue2, UITableViewCellStyleSubtitle};
NS_ENUM的参数含义:
- 第一个参数:存储的类型
- 第二个参数:类型的名称
0 0
- 枚举 ENum
- enum枚举
- Enum:枚举
- enum 枚举
- 枚举(enum)
- Enum 枚举
- enum(枚举)
- 枚举 Enum
- Enum枚举
- 枚举 Enum
- 枚举Enum
- enum枚举
- enum 枚举
- 枚举enum
- 枚举enum
- enum 枚举
- 枚举(Enum)
- 枚举 enum
- 工业水处理工程:威立雅工业污水处理工程利用污水净化机理
- JVM系列三:JVM参数设置、分析
- 游戏服务器端开发要点
- Vektor代码库
- Android开发之日历控件实现
- 枚举enum
- linux下解压命令大全
- Java synchronized详解
- 算法摘记 线段树
- WAP、触屏版网站及APP的区别
- 环境:QT Create 快捷键
- 标准I/O-1-getchar,scanf,gets,fgets,puts,fputs,格式控制
- SAS学习笔记之自动发邮件
- informatica ETL开发过程