ReflectableEnum
Arkadiusz Holko’s ReflectableEnum (via Mac Dev Weekly):
A macro and a set of functions introducing reflection for enumerations in Objective-C.
Features:
You replace NS_ENUM
with REFLECTABLE_ENUM
, which parses the text of the definition and generates a family of helper functions.
See also: JREnum, which seems to be more flexible about the values it supports, but uses typedef enum
instead of NS_ENUM
.
Update (2015-05-26): Arkadiusz Holko now has a blog post about ReflectableEnum.