So, I am able to create an array that populates the fields of the Table, but am having troubles creating the subtext that appears below the main fields. I currently have:
- (void)viewDidLoad {
[super viewDidLoad];
listOfForms = [[NSMutableArray alloc] init];
[listOfForms addObject:@"First Form"];
}
and then:
NSString *cellValue = [listOfDAForms objectAtIndex:indexPath.row];
cell.textLabel.text = cellValue;
in the cellForRowAtIndexPath portion. Why can't I add:
listOfNames = [[NSMutableArray alloc] init];
[listOfNames addObject:@"Named Form"];
and
NSString *cellSubscript = [listOfNames objectAtIndex:indexPath.row];
cell.detailTextLabel开发者_如何学Python.text = cellSubscript;
in order to make the little subview work? What am I doing wrong?
Be sure to init your cell with the style UITableViewCellStyleSubtitle
精彩评论