【发布时间】:2014-08-07 13:02:40
【问题描述】:
我有一个标头 (@interface),我在其中声明了一个枚举器。
我将该枚举器的类型作为 initWithDelegate 构造函数的参数引用,但 XCode 不认为它是有效类型。
我会很感激对此的一些建议。
代码如下:
#import <Foundation/Foundation.h>
@interface ReportLoader : NSObject
@property (nonatomic, strong) NSString* fileKey;
//Issue with this line at the pReportType parameter declaration.
-(NSObject*)initWithDelegate:(NSObject*)pDelegate andService:(ServiceReference*)pService andFileKey:(NSString*)pKey andReportType:(ReportType)pReportType;
typedef enum ReportTypes
{
GridReport = 1,
TableReport = 2,
FlowReport = 3,
}ReportType;
@end
【问题讨论】:
标签: objective-c xcode enums