You can consider them as integers, since they are implicitly assigned by integer values:
- (void) encodeWithCoder: (NSCoder *)coder { ... [coder encodeInt:type forKey:@"state"]; } - (id) initWithCoder: (NSCoder *)coder { ... state = [coder decodeIntForKey:@"state"]; }
Ushox
source share