this is a list of table view inside of my tab bar application, i dont know how to get it to have individual cells for example if i were to click on Leg Workouts it would go to a leg workout table that says Leg Workout 01 Leg workout 02 Leg Workout 03, i want it to say something like Calf Raises, Leg Press, Box Jumping, also how do i get it to list more then 3 rows? thanks.
Code:
if ([self.title isEqualToString:@"Leg Workouts"]) {
cell.textLabel.text = [NSString stringWithFormat:@"Leg Workout%d", [indexPath indexAtPosition:1]];
cell.textLabel.text = [NSString stringWithFormat:@"Leg Workout %d", [indexPath indexAtPosition:1]];
} else if ([self.title isEqualToString:@"Ab Workouts"]) {
cell.textLabel.text = [NSString stringWithFormat:@"Ab Workout %d", [indexPath indexAtPosition:1]];
}else if ([self.title isEqualToString:@"Chest Workouts"]) {
cell.textLabel.text = [NSString stringWithFormat:@"Chest Workout %d", [indexPath indexAtPosition:1]];
}else if ([self.title isEqualToString:@"Shoulder Workouts"]) {
cell.textLabel.text = [NSString stringWithFormat:@"Shoulder Workout %d", [indexPath indexAtPosition:1]];
}else if ([self.title isEqualToString:@"Back Workouts"]) {
cell.textLabel.text = [NSString stringWithFormat:@"Back Workout %d", [indexPath indexAtPosition:1]];
}else if ([self.title isEqualToString:@"Bicep Workouts"]) {
cell.textLabel.text = [NSString stringWithFormat:@"Bicep Workout %d", [indexPath indexAtPosition:1]];
}else if ([self.title isEqualToString:@"Tricep Workouts"]) {
cell.textLabel.text = [NSString stringWithFormat:@"Tricep Workout %d", [indexPath indexAtPosition:1]];
}else if ([self.title isEqualToString:@"Miscellaneous Workouts"]) {
cell.textLabel.text = [NSString stringWithFormat:@"Miscellaneous Workout %d", [indexPath indexAtPosition:1]];
}
return cell;
}
Last edited by a moderator: