0
我有兩個類,Subject類和Chapter Class。Objective C訪問其他類變量值
我已設定NSMutable
陣列中Subject類等
@property(nonatomic,retain)NSMutableArray *htmlURL;
在.m文件
:
htmlURL = [[NSMutableArray alloc]init];
[htmlURL addObject:@"1", @"2"];
在類章這樣做,
Subject *sub = [[Subject alloc] init];
NSLog(@"%@"sub.htmlURL);
輸出是空的...我想在章節類的htmlurl數組值..我在這裏失蹤..
你必須表現出更多的代碼,其中在.m文件你分配/數組初始化?在init方法中?你的目標是哪個? – Pieter
我正在解析XML,所以在parserDidStartDocument方法我是分配/初始化數組.. –
是章節的主體? –