There are many, many similar questions to this, but I have tried every conceivable thing and am pulling my hair out trying to get this to work!
I have an array, which is passed down from other viewcontrollers, and is deeply embedded in my code. I read this in to the viewcontroller where I need to use this, and I can print this out using:
NSLog(@"array = %@", myarray);
Which returns:
2015-08-29 12:35:27.330 myapp[2679:234549] array = {
date1 = 2000;
date2 = 2010;
reference = 8;
text = "test 4";
}
So the array exists fine, and I can access it fine.
But I can't seem to be able to do the most easiest thing and use these values from the array!
I have tried simply accessing the first row by doing:
NSString *row1 = myarray[0];
But this crashes the app.
I need to access the data from this array, so that I can populate a table with the values.
Can someone help???
crash log:
2015-08-29 12:40:05.738 myapp[2721:236045] -[__NSCFDictionary objectAtIndexedSubscript:]: unrecognized selector sent to instance 0x7fecd3702500 2015-08-29 12:40:05.742 myapp[2721:236045] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFDictionary objectAtIndexedSubscript:]: unrecognized selector sent to instance 0x7fecd3702500'