I am trying to store an NSString variable in an NSMutableArray:
@property(weak,nonatomic) NSMutableArray * stringLines;
//----
NSString * string=@"hello";
[self.stringLines addObject: string];
int i=0;
for (id obj in _stringLines){
NSLog(@"printing labels: index %x word %@",i, obj);
i++;
}
but when I try to print the mutable array, it shows me null values. I don't want to assign the text directly to the array, it has to be through the variable string.