John-Lluch / SWRevealViewController

A UIViewController subclass for presenting side view controllers inspired on the FaceBook and Wunderlist apps, done right !
Other
4.52k stars 988 forks source link

How to dismiss present viewcontroller then push viewcontroller ? #663

Open IOSDeveloperProgrammer opened 7 years ago

IOSDeveloperProgrammer commented 7 years ago

I am having three view controller (V1, V2, V3). V1 come out from swerveal, v2 coming from v1 .which is has button clicked on push navigation (v1), v3 is present . so if i dismiss v3 then back to go V1 then immediately dismiss the v2 . How can i does ? please help me

iDevelopper commented 7 years ago

Not clear enough, could you show a storyboard with annotations?

IOSDeveloperProgrammer commented 7 years ago

@iDevelopper I was written

V3 in custom back button: controller v1 = [self.storyboard instantiateViewControllerWithIdentifier:@"v1"]; UINavigationController nav = [[UINavigationController alloc ] initWithRootViewController:vc1 ]; AppDelegate app = [[UIApplication sharedApplication] delegate]; app.swreveal = [[SWRevealViewController alloc] initWithRearViewController:menu frontViewController:nav]; AppDelegate appDele = [[UIApplication sharedApplication] delegate]; [appDele.window setRootViewController:app.swreveal]; [appDele.window makeKeyAndVisible];