DataController.h2つのインターフェイス?
@class Play;
@interface DataController : NSObject
- (unsigned)countOfList;
- (Play *)objectInListAtIndex:(unsigned)theIndex;
@end
DataController.mは
#import "DataController.h"
#import "Play.h"
@interface DataController()
@property (nonatomic, copy, readwrite) NSMutableArray *list;
- (void)createDemoData;
@end
@implementation DataController
@synthesize list;
- (id)init {
if (self = [super init]) {
[self createDemoData];
}
return self;
}
は、なぜあなたは二回@interface定義されていることと思いますか?そして()の意味は?かっこの間にスーパークラスがあるクラス名はありませんか?
http://stackoverflow.com/questions/862299/how-を参照してください。 do-a-category-work-in-objective-c – XJones