Hey all,
I initialize an array with dictionaries:
Now at some point those values can change to TRUE. When my table view loads, I want to find out the value of @"Dynamic Fence" and @"Engine Immobilizer" each of which will represent a cell in the table:
The code above is wrong. I am hard coding "dynamic fence", but rather i just want each cell to be associated with each index (nsdictionary) of the array, but not sure how to perform the check here.
thanks for response
I initialize an array with dictionaries:
Code:
remoteTableViewData = [NSArray arrayWithObjects:[NSDictionary dictionaryWithObjectsAndKeys:FALSE,@"Dynamic Fence", nil],[NSDictionary dictionaryWithObjectsAndKeys:FALSE,@"Engine Immobilizer", nil],nil];
Now at some point those values can change to TRUE. When my table view loads, I want to find out the value of @"Dynamic Fence" and @"Engine Immobilizer" each of which will represent a cell in the table:
Code:
if ([[remoteTableViewData objectAtIndex:indexPath.row] objectForKey:@"Dynamic Fence"] == FALSE)
{
cell.imageView.image = [UIImage imageNamed:@"unchecked.png"];
}
else {
cell.imageView.image = [UIImage imageNamed:@"checked.png"];
}
The code above is wrong. I am hard coding "dynamic fence", but rather i just want each cell to be associated with each index (nsdictionary) of the array, but not sure how to perform the check here.
thanks for response