enum在最新的工具中,现在允许使用一种新的s:
typedef enum CarType : NSUInteger {
FourDoorCarType,
TwoDoorCarType
} CarType;
我的问题分为几部分:
为什么我应该使用这个而不是旧的方式?
为什么会
CarType出现两次?我尝试跳过CarType第一行并将第一行保留为“typedef enum : NSUInteger {”,它似乎工作正常。有什么缺点,如果有的话?可以使用其他类型
NSUInteger吗?