objective c - How do I convert this enum to an NS_ENUM? -
I'm working on changing the purpose-c code to use the ns types So that we can more easily switch between 32- and 64-bit. Most of the enum s I have run in:
typedef enum {ValueA = 0, ValueB, ... ValueN,} NameOfEnum; And so I just replace typedef enum with typedef NS_ENUM (NSInteger, NameOfEnum) , remove the downstream NameOfEnum , And go ahead, creating the code that looks like this:
typedef NS_ENUM (NSInteger, NameOfEnum) {ValueA = 0, ValueB, ... ValueN,}; However, a special library formats these types of formats: enum NameOfEnum {ValueA = 0, ValueB, ... ValueN, }; Typedef enum NameOfEnum Named FNM;
How do I convert it? Intivisive I want to change enum NameOfEnum with my standard typedef NS_ENUM (NSInteger, NameOfEnum) and just delete that last line altogether < Strong> Is this the right thing, or will possibly be something different in this comprehensive library?
The last time you are right first creates an enum and then the same name Makes a type together
Comments
Post a Comment