enum BlenderSpeed {
BlenderSpeedStir = 1,
BlenderSpeedChop = 2,
BlenderSpeedLiquify = 5,
BlenderSpeedPulse = 9,
BlenderSpeedIceCrush = 15
};
typedef enum {
BlenderSpeedStir2 = 1,
BlenderSpeedChop2 = 2,
BlenderSpeedLiquify2 = 5,
BlenderSpeedPulse2 = 9,
BlenderSpeedIceCrush2 = 15
} BlenderSpeed2;
//NS_ENUM()实际上是一个预处理器宏,带有两个实参: 数据类型和名字
typedef NS_ENUM(int, BlenderSpeed3) {
BlenderSpeedStir3,
BlenderSpeedChop3,
BlenderSpeedLiquify3,
BlenderSpeedPulse3,
BlenderSpeedIceCrush3
};
网友评论