ios - Topview Controller for UITabBar -
i have table view displays parent folder details. when select row want display contents of corresponding kid folder has 2 windows using tab bar controller - 1 display table of details , 1 display graph.
the issue code have found @ topviewcontroller uitabbar not able display contents @ selected index path rather fixed index of 0 or whatever number manually input. may wrong affecting result of displaying, not sure.
my code works fine displaying right content in immediate window sec window linked tab bar controller doesn't display @ all. have swapped windows , same issue - first window displays, sec not.
this prepare segue code:
-(void)prepareforsegue:(uistoryboardsegue *)segue sender:(id)sender{ if ([[segue identifier] isequaltostring:@"showfiledetails"]){ uinavigationcontroller * navigate = segue.destinationviewcontroller; //create reference index path nsindexpath * indexpath = [self.tableview indexpathforselectedrow]; filedetailsvc * filedetails = (filedetailsvc *)[navigate.viewcontrollers objectatindex: 0]; //create reference parent folder beingness selected parentfile * selectedfile = (parentfile*)[self.fetchedresultscontroller objectatindexpath:indexpath]; //reference the next view filedetails.selectedfile = selectedfile; } }
i have tried utilize "indexpath" in [navigate.viewcontrollers objectatindex: ]; , changed objectatindex objectatindexpath gives error message of "incompatible pointer integer..." , "no visible @interface 'nsarray' declares selector 'objectatindexpath'".
hopefully it's nil hard solve. thanks.
segue's destination controller uitabbarcontroller rather uinavigationcontroller. didn't set datasource view controller in other tab, don't see anything.
uitabbarcontroller * tabbarcontroller = segue.destinationviewcontroller; viewcontrollerfortabitem2 * controller = (viewcontrollerfortabitem2 *)[tabbarcontroller.viewcontrollers objectatindex:1]; controller.datasource = selectedfile;
ios objective-c iphone ipad
No comments:
Post a Comment