static tableview connect to an another dynamic tableview

I play around with UITableViews. Now I do have one static table view connect to an dynamic table view. Even I click on the row from the static table view, it should change AND SHOW UP the detail in the dynamic table view. But my problem is, it will change, but the table view is empty.

BUT, if I try to show up first the dynamic table view, it will work fine...

How is that impossible?

It looks like that:

Code from the dynamic table view:

- (void)viewDidLoad {
    [super viewDidLoad];

    self.weekdays = [NSMutableArray arrayWithObjects:@"a", @"b", @"c", @"d", @"e", @"f", @"g", nil];



- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {

    return 1;

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {

    return [self.weekdays count];

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {

    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"weekdaysCell" forIndexPath:indexPath];

    cell.textLabel.text = [self.weekdays objectAtIndex:indexPath.row];

    return cell;


ctrl + drag from one of the cells in section 2 (make sure only the cell is selected) to the other tableviewcontroller in the pop up choose : Show from the Selection Segue list

You should make sure that in Utilities-> identity inspector -> custom class , you have the class that implements the tableviewcontroller you use to fill up your table.

Click on the prototype cell and In the Utilities-> attributes inspector -> identifier , did you type "weekdaysCell" ?

I tested your code, it works when I name the prototype cell in the dynamictable! :)

Need Your Help

Apache Ant installation Windows 7

java xml apache ant build

When I do ant -version on command line, it says not recognized. Any ideas on how to fix? I'm trying to make a build.xml for a Java project.

Creating a generic next button for UITextField

ios objective-c for-loop tags uitextfield

I am trying to create a next button that works with the textField's tag.