-1

I want to create table, and when click cell in table , the content will display in another view. Each of table has different design. How do I do that.

enter image description here

I don't enough to post image, you can see in this link. thanks.

David Duponchel
  • 3,959
  • 3
  • 28
  • 36
  • Use the UITableViewDelegate method suggested by Ramdy, push another view controller in that method, pass all the required data to that controller and display it there, the way you want to. – dispatchMain Dec 02 '13 at 07:41

1 Answers1

2

Use this delegate method:

-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
    [self performSegueWithIdentifier:@"InstructionToSection" sender:nil]; //"InstructionToSection" is seque name
}



-(void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
    InstructionSectionViewController * instructSection = [segue destinationViewController];  // InstructionSectionViewController is ur next viewcontroller. 1st u need to import your destination viewcontroller in header
    instructSection.SelectedItem = @"Ur Passing value"; // selectedItem should be declare in InstructionSectionViewController as property, need to synthesize 

}

For more detail refer to this link

Ramdhas
  • 1,765
  • 1
  • 18
  • 26