I am testing NSMutableArray and do not understand what i am doing wrong.
When i define “myArray” locally the [myArray addObject:@”First line”]; works but if i define it in the .h file it ends up as null.
I am using myArray to add the text of multiple selected cell’s in a UITableView “didSelectRowAtIndexPath”.
Could someone nice explain what i am doing wrong?
Are you just declaring an NSMutableArray in the header file? If so, it still needs to be initialized somewhere in the .m file. You could do this like so: