cancerian
cancerian

Reputation: 942

uitableview detail view using storyboard

Im new to storyboard. Im trying to create a tableview with static cells (1 section with 2 rows). Now i need to go to different views on taping the rows.

How can i connect the view in Interface builder??

This method is not required as im not passing any data to the next view.

- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
    NSLog(@"%@",segue.identifier);

}

I need to show static views on tapping the row of the table.

In interface builder im not able to create more than 1 segue for a section.

Upvotes: 0

Views: 267

Answers (1)

Cynichniy Bandera
Cynichniy Bandera

Reputation: 6103

  1. Open your story board in separate window so that your source code is also seen on display;
  2. Open your *.h file (perhaps that one your main view controller is declared);
  3. In interface builder, drag the event you want to use to your *.h file. xcode will draw something like a placeholder in the place you drag it and when you drop it, it will generate IBaction method for you. Just implement it (using segues or something else) and here you have it.

prepareForSegue is different thing. You may use segues too (think of segue as about descriptor of your controller-to-controller move) but it is a different workflow. There is tons of documentation on this.

Upvotes: 1

Related Questions