iphone detailtext in UITableView question
- by Rob
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.text = cellSubscript;
in order to make the little subview work? What am I doing wrong?