Skip to content

Dmitriy-Gonchar/ObjectiveC-NSString-ENUM

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ObjectiveC-NSString-ENUM

Macros for enums NSString-type;

Classic ENUM syntax:

typedef NS_ENUM(NSInteger, Mytype)
{
	kValue1 = 1,
	kValue2 = 2,
	kValue3 = 3,
	kValue4 = 4,
};

ObjectiveC-NSString-ENUM syntax:

STRING_ENUM(SType2,
	      kStringValue0,
	      kStringValue1,
	      kStringValue2,
	      kStringValue3);

automatic string-value from name: name == X, value == @"X"

Autocomplete first type: Screen1.png and second type: Screen2.png