xcode - Using enums in method arguments in Objective-C -


i have header file apimanager.h in define enum:

typedef enum apiendpoint {     // values } apiendpoint; 

in file, have method takes 1 of these values argument:

- (nsstring *) getpathforendpoint: (apiendpoint) endpoint; 

and seems fine xcode. in file, however, apimanagerdelegate.h, have following definitions:

- (void) requesttoendpoint: (apiendpoint) endpoint succeeded: (id) responseobject; - (void) requesttoendpoint: (apiendpoint) endpoint failed: (nserror *) error; 

and xcode flags both of apiendpoint arguments error expected type. have imported apimanager.h apiendpoint show in completions list, reason xcode isn't recognising it.

what doing wrong?

it looks cyclic dependencies problem, pointed out @trojanfoe has mysteriously deleted answer.

moving typedef separate file apiendpoint.h solved issue.


Comments

Popular posts from this blog

php - Submit Form Data without Reloading page -

linux - Rails running on virtual machine in Windows -

php - $params->set Array between square bracket -