Hi I am trying to make table view that has 5 cell and each cell automatically fills from the data or data type I have stored. here is the an example of what I have in mind, Please let me know if my question wasn't clear enough cheers.
Maybe I asked my question in a wrong way, I'll try to explain it more. So the Application I am making works this way: I have 5 different Drill type that each has different condition, and I need to make a different drill recording stats (UI) and tableView for each drill type, So in the first table view that call Drills I have a cell that should show drill type and date that user made also one Create drill button that takes the user to create drill (UI ), that has some attributes in it for example name, date , and DrillType(only 5 option), After this I have to make 5 different table and scoringViewControl for each drill type specifically that they be able to insert their stats as many times as they want. And here I have problem, I don’t know what is the best way to manage navigating my cells in to the correct [drilltype] tableview.. (if I didn’t have to have some condition in create drill I would just made 5 statics Cell and navigate them into different direction)
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
if([self.drill.drillType isEqual: @"Grouping"] ){
static NSString *CellIdentifier = @"Cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier forIndexPath:indexPath];
Drill *drill = [self.fetchedResultsController objectAtIndexPath:indexPath];
cell.textLabel.text = drill.drillType;
cell.detailTextLabel.text = drill.drillDate;
return cell;
}
else if([self.drill.drillType isEqual: @"Normal"] ){
static NSString *CellIdentifier = @"Cell2";
UITableViewCell *cell2 = [tableView dequeueReusableCellWithIdentifier:CellIdentifier forIndexPath:indexPath];
Drill *drill = [self.fetchedResultsController objectAtIndexPath:indexPath];
cell2.textLabel.text = drill.drillType;
cell2.detailTextLabel.text = drill.drillDate;
return cell2;
}
return 0;
}