iPhone app crash [__NSCFString objectForKey:] unrecognized selector sent to instance
问题 I am trying to add in tempArray only even number of data.localBookmarks is array of dictionary. Here is my code : currentIndex = indexPath.row; for (NSDictionary *dict in localBookmarks) { if (currentIndex % 2 == 0 && currentIndex <= [localBookmarks count]) { [tempArray addObject:[dict objectForKey:@"firstName"]]; } currentIndex++; } NSLog(@"tempArray %@",tempArray); cell.textLabel.text = [tempArray objectAtIndex:indexPath.row]; return cell; my app crash on [tempArray addObject:[dict