i working on app opens tableview, once cell selected user taken second tableview of options related first cell selected in first tableview. on second tableview, user should select 1 more cell , taken detail view.
i have first tableview showing , second tableview displaying should. problem selecting on second tableview , being taken detail view. detail view screen comes up, empty.
i have tried adding nslogs see if nsset contains anything, doesn't seem show anything. have looked sql file , contain data, know has been written in, problem accessing it.
my code prepareforsegue on second tableview screen below. please tell me if see terribly wrong.
- (void)prepareforsegue:(uistoryboardsegue *)segue sender:(id)sender { if ([segue.identifier isequaltostring:@"toexplanation"]) { nsindexpath *indexpath = [self.tableview indexpathforselectedrow]; explanationviewcontroller *destviewcontroller = segue.destinationviewcontroller; nsset *optionchoices = [[self threescreen] theoptions]; _selectioncontent = [optionchoices allobjects]; nslog(@"%@",[optionchoices allobjects]); nssortdescriptor *namesort = [[nssortdescriptor alloc] initwithkey:@"name" ascending:yes]; nsarray *sortedchoices = [optionchoices sortedarrayusingdescriptors:[nsarray arraywithobject:namesort]]; nslog(@"%@", sortedchoices); option *option = [sortedchoices objectatindex:indexpath.row]; destviewcontroller.explaintome = option.explanation; //destviewcontroller.explaintome = @"working?"; nslog(@"%@",option.explanation); }
if uncomment 'destviewcontroller.explainttome = @"working?"; can see 'working?' in detailview.
Comments
Post a Comment