0
我有一个头文件ApiManager.h
使用枚举,其中我定义一个枚举:在目标C的方法参数
typedef enum ApiEndpoint {
// some values
} ApiEndpoint;
在该文件中,我有取这些值作为参数之一的方法:
- (NSString *) getPathForEndpoint: (ApiEndpoint) endpoint;
而这似乎是XCode罚款。在另一个文件,但是,ApiManagerDelegate.h
,我有以下定义:
- (void) requestToEndpoint: (ApiEndpoint) endpoint succeeded: (id) responseObject;
- (void) requestToEndpoint: (ApiEndpoint) endpoint failed: (NSError *) error;
和XCode的标志双方的ApiEndpoint
论点错误expected a type
。我已导入ApiManager.h
,因此ApiEndpoint
会显示在完成列表中,但由于某种原因,XCode无法识别它。
我在做什么错?
我建议使用typedef NS_ENUM(NSInteger,UITableViewCellStyle)宏来定义您的枚举。 – singingAtom 2014-09-22 21:11:13