Newbie here (to C, objective-C, and iOS)...
For this code in my AppDelegate.m, why is the freshly initialized array empty? Looks to me like I give it some values. Clue1 etc are are series of UILabels and there are no issues noted by Xcode. I've been through SO quite a bit and this seems to be the way to do it. Xcode 4.2. Thanks!
- (id)init {
self = [super init];
if(self) {
// Make arrays containing the objects: this is the objective-C way!
self.clueLabs = [[NSMutableArray alloc] initWithObjects: Clue1, Clue2, Clue3, nil];
}
NSLog(@"%@", [clueLabs description]);
if (!clueLabs || ![clueLabs count]) { // these 2 do m/l the same thing
NSLog(@"clueLabs is empty!");
}
return self;
}