objective c - SIngle master view controller and multiple single view controller using UISplitViewController -
i new in ios,
i try work uisplitviewcontroller. single master view , single detail view in work add second detail view controller, it's not work first detail view controller it's override on first detail view controller, try it's display on right side of first detail view controller not override on first detail view controller.
below display to try code
first prepareforsegue method can't work:
- (void)prepareforsegue:(uistoryboardsegue *)segue sender:(id)sender { if ([segue.identifier isequaltostring:@"action"]) { nsindexpath *indexpath = [self.tableview indexpathforcell:sender]; viewcontroller *view = (viewcontroller *)[[segue destinationviewcontroller] topviewcontroller]; view.imagename = [_images objectatindex:indexpath.row]; view.navigationitem.leftitemssupplementbackbutton = yes; } }
second didselectrowatindexpath it's work override first detail view controller:
- (void)tableview:(uitableview *)tableview didselectrowatindexpath:(nsindexpath *)indexpath { viewcontroller *view = (viewcontroller *)[self.storyboard instantiateviewcontrollerwithidentifier:@"viewcontroller"]; nsstring *imagename = [_images objectatindex:indexpath.row]; view.imagename = imagename; [self.navigationcontroller pushviewcontroller:view animated:yes]; }
thank you.
Comments
Post a Comment