I'm trying to set array values in UITableViewCell at cellAtRowIndexPath - method, but it's giving the exception
[NSCFType objectAtIndex:]: unrecognized selector sent to instance 0x445e980' 2011-05-26 13:34:12.812 addressBook[2603:20b] Stack: ( 9180251,
the values in 'people' array is of type 'NSCF'. I guess, it have to convert in to NSString. how will I show the vaues of 'people' array in tableviewcell? here is my code:
- (void)viewDidLoad { [super viewDidLoad]; ABAddressBookRef addressBook = ABAddressBookCreate(); people = (NSArray *)ABAddressBookCopyArrayOfAllPeople(addressBook); NSLog(@"people....%@",people ); // Uncomment the following line to display an Edit button in the navigation bar for this view controller. // self.navigationItem.rightBarButtonItem = self.editButtonItem; } - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @"Cell"; UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; if (cell == nil) { cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease]; } // Set up the cell... cell.text = [people objectAtIndex:indexPath.row]; return cell; }
people
? It doesn't seem to contain strings. – Deepak Danduprolu