In myObject.h:
typedef enum {
GET,
POST
} HTTPMethods;
And then inside the @interface definition, a property:
@property (nonatomic) HTTPMethods *httpMethod;
In myClass.m, I have the #import of myObject.h and then:
myObject *obj = [[myObject alloc] init];
obj.httpMethod = POST;
This seems to work, but the compiler yells at me:
`Incompatible integer to pointer conversion assigning to 'HTTPMethods *' from 'int'.
Where am I going wrong here?
An enum is a built-in type, and not an object. As such, you probably want to store the integral value itself and not a pointer.