Objective-C Language typedef enum declaration in Objective-C


Example

A enum declares a set of ordered values - the typedef just adds a handy name to this. The 1st element is 0 etc.

 typedef enum {
        Monday=1,
        Tuesday,
        Wednesday

    } WORKDAYS;

    WORKDAYS today = Monday;//value 1