0

I have application like facebook and I want to know how to Pop Frontview controller SWRevealViewController?

Following code is use to push frontviewcontroller from rearview controller.suppose front view controller have back button now i want to pop dashboard.How can I do that.

Code

AwardsViewController *awardsVC = [[AwardsViewController alloc]init];

SWRevealViewController *revealController = self.revealViewController;

UINavigationController *frontNavigationController = (id)revealController.frontViewController;

NSString *suffix = UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad ? @"AwardsViewController_iPad" : @"AwardsViewController";

 awardsVC=[[AwardsViewController alloc]initWithNibName:suffix bundle:nil];
UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:awardsVC];

[revealController pushFrontViewController:navigationController animated:YES];

Images to understand

1) Dashboard 2) SWRevealViewController (Rear) 3) profile

Description

when I am Login then Display Dashboard Now I click on Rear View controller.In rear view controller click on any facebook contact then navigate to his profile. now I want to pop like facebook in my app using SWRevealViewController.

Navigation like

Dashboard > Click On Rear > Click on Any Contact > push forntview controler > now i want to pop on dashboard

Thanks

Any help appriciate.

Maulik shah
  • 1,664
  • 1
  • 19
  • 45
  • `SWRevealViewController's` menu have in build push segue's to transit, you can create a button for that or try overriding rear button (i haven't tried). – vaibhav Nov 03 '16 at 07:41
  • Button is aleready created.but problem with pop. I can push on back button but that's not proper wway – Maulik shah Nov 03 '16 at 07:44
  • confusion here.. you need to push back your app to dashboard when you transit with `SWRevealViewController's` menu?, share screenshot please. – vaibhav Nov 03 '16 at 07:50
  • In sort when I press back button pop to dashboard(like facebook). – Maulik shah Nov 03 '16 at 08:53

0 Answers0