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

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

python - Django-easy-pdf: xhtml2pdf reporting reportlab 2.2+ is required, but 3.0 installed -

collision detection - C++ library for mesh to mesh intersection: what is available? -