iPhone xcode array losing state after load
- by Frames84
Right i've had a search around and can't find anything.
@synthesize list; // this is an NSArry
-(void) viewDidLoad
{
NSArray *arr = [self getJSONFeed];
self.List = [arr retain]; // if i copy the access code into here it works fine.
}
-(void) tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
NSUInteger row = [indexPath row];
NSArray *vals = [list objectAtIndex:row] retain];
NSString *id = [vals valueForKey:@"id"]; // ERROR
}
right i've taken some of the code to try and provide it as simple as possible, ignore typo's and memory leaks this is sorted.
Basically when I select a row I can't get data out of my 'list' array object.
Please can anyone help me out?