this is a noob question but I cannot for the life of me figure out why my MSMutableArray class variable is not being set. Below is my code:
@interface MyClass : NSObject {
NSMutableArray *imageArr;
}
@implementation MyClass
-(id)init
{
self = [super init];
if (self) {
imageArr = [[NSMutableArray alloc] init];
}
return self;
}
- (void) checkImageArr {
NSLog(@"imageArr size::%@",[imageArr count]);
}
When this code runs, the following is set to the log:
imageArr size::(null)
Why is that variable not being set? I looked at the following question and don't see anything different between my code and the accepted answer.
Thanks.