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

Python Kivy ListView: How to delete selected ListItemButton? -

asp.net mvc 4 - A specified Include path is not valid. The EntityType '' does not declare a navigation property with the name '' -