ios - static tableview connect to an another dynamic tableview -


i play around uitableviews. have 1 static table view connect dynamic table view. click on row static table view, should change , show detail in dynamic table view. problem is, change, table view empty.

but, if try show first dynamic table view, work fine...

how impossible?

it looks that:

https://www.dropbox.com/s/cr6m50bqdic6yrk/bildschirmfoto%202015-06-25%20um%2018.20.26.png?dl=0

code dynamic table view:

- (void)viewdidload {     [super viewdidload];      self.weekdays = [nsmutablearray arraywithobjects:@"a", @"b", @"c", @"d", @"e", @"f", @"g", nil]; }  -(void)viewdidappear:(bool)animated{  }  - (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 1 of cells in section 2 (make sure cell selected) other tableviewcontroller in pop choose : show selection segue list

you should make sure in utilities-> identity inspector -> custom class , have class implements tableviewcontroller use fill table.

click on prototype cell , in utilities-> attributes inspector -> identifier , did type "weekdayscell" ?

i tested code, works when name prototype cell in dynamictable! :)

https://www.dropbox.com/s/4oh1z160t7gdg33/screen%20shot%202015-06-25%20at%204.11.20%20pm.png?dl=0


Comments

Popular posts from this blog

How has firefox/gecko HTML+CSS rendering changed in version 38? -

javascript - Complex json ng-repeat -

jquery - Cloning of rows and columns from the old table into the new with colSpan and rowSpan -