ios - Pushing UINavigationController from a subview doesn't show properly -


i have segmentcontrol in uiviewcontroller embedded in uinavigationcontroller. i'm adding uiviewcontroller subview in 1 of segment uinavigationcontroller , pushing detailviewcontroller it.

now problem is, i'm not getting pushed controller on top of existing view. how can achieve that? below code i'm using push viewcontroller subview.

for segmentcontrol -

    if (segmentcontrol.selectedsegmentindex==1) {       firstview = [self.storyboard   instantiateviewcontrollerwithidentifier:@"firstviewcontroller"];         [self.view addsubview:firstview.view];  } 

after cell selection -

- (void)tableview:(uitableview *)tableview didselectrowatindexpath:(nsindexpath *)indexpath {   detailviewcontroller *detailview = [self.storyboard           instantiateviewcontrollerwithidentifier:@"detailviewcontroller"];  [self.navigationcontroller pushviewcontroller:detailview animated:yes];  [tableview deselectrowatindexpath:indexpath animated:yes];  } 


Comments

Popular posts from this blog

javascript - DIV "hiding" when changing dropdown value -

Does Firefox offer AppleScript support to get URL of windows? -

android - How to install packaged app on Firefox for mobile? -