Skip to content

Instantly share code, notes, and snippets.

Created November 8, 2012 10:47
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
NSLog(@"Adding Cell");
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"tokenSuggestCell"];
if (!cell) {
NSArray *nib = [[NSBundle mainBundle] loadNibNamed:@"MyTokenFieldCell" owner:self options:nil];
cell = (UITableViewCell *)[nib objectAtIndex:0];
}
MyTokenViewDataModel *tokenData = [self.dataController objectInListAtIndex:indexPath.row];
NSLog(@"%@", tokenData.title);
cell.textLabel.text = tokenData.title; // crashes here. Maybe my TableViewCell XIB is not created correctly.
return cell;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment