ios - How to use a nib to configure DetailViewController? -


i have multiple cells in table referring same detailviewcontroller. how can use nibs redirected same detailviewcontrollers different content?

you can selected indexpath method.

- (void)tableview:(uitableview *)tableview didselectrowatindexpath:(nsindexpath *)indexpath { } 

from method can load detailviewcontroller this,

detailviewcontroller *detailviewcontroller = [[detailviewcontroller alloc] initwithnibname:@"detailviewcontroller" bundle:nil];     uinavigationcontroller *tableviewnavigationcontroller = [[uinavigationcontroller alloc] initwithrootviewcontroller:detailviewcontroller]; [self.navigationcontroller presentviewcontroller:tableviewnavigationcontroller animated:yes completion:nil]; 

in above method can assign values want change when select different cells.


Comments

Popular posts from this blog

windows - Single EXE to Install Python Standalone Executable for Easy Distribution -

c# - Access objects in UserControl from MainWindow in WPF -

javascript - How to name a jQuery function to make a browser's back button work? -