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
Post a Comment