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 make SWRevealViewController works like covering the main view not as default pushing the main view ? #669

Open Mohammed-Elias opened 7 years ago

Mohammed-Elias commented 7 years ago

Is there any parameter in the class I can modify to make that happen ?

iDevelopper commented 7 years ago

1) Use right view controller as front and front view controller as menu

2) https://github.com/iDevelopper/PBRevealViewController

Mohammed-Elias commented 7 years ago

Thanks but it sounds another library ?

iDevelopper commented 7 years ago

Yes, 1. is the solution with SWRevealViewController, 2. is the solution with another library.

Mohammed-Elias commented 7 years ago

Good, but what exactly should I do with the storyboard I have this: 1) the segue from Reavel View Controller to menu is (sw_rear). 2) the segue from Reavel View Controller to Home is (sw_front).

what should I change ?

iDevelopper commented 7 years ago

With SWRevealViewController?

Mohammed-Elias commented 7 years ago

yes

iDevelopper commented 7 years ago

sw_front from Reveal View Controller to menu. sw_right from Reveal View Controller to home.

Mohammed-Elias commented 7 years ago

forgive me, but I should explain more: I want Menu VC to cover Home VC and the configuration right now is : 1) the segue from Reavel View Controller to menu is (sw_rear). 2) the segue from Reavel View Controller to Home is (sw_front).

with these configuration Menu push the Home when I make gesture or tap the button of menu

when I make your changes I got the Menu as the landing view and if I go to Home from the menu I cant go back by the gesture.

iDevelopper commented 7 years ago

You have to check some parameters like rightViewRevealWidth, rightViewRevealOverdraw etc...

And add the reveal pan gesture to the reveal controller view.

This is a bit complicated and I recommend to switch to the other library witch is very similar.

Mohammed-Elias commented 7 years ago

thanks a lot, and by the way your PBRevealViewController is awesome.