How to add right side Slide Menu iOS

9.4k views Asked by At

I want to make a Slide Menu (both right & left side) in Storyboard. Here the left Side Menu panel is a viewController and an UITableView with customCell embedded in it to perform the menu style. I have followed a youtube "tutorial" and the left side panel working perfectly. But now I need to do the same thing for right side slide menu. Exact same thing.

When I connect the segue, the sw_rear storyboard segue identifier is used for the left menu and the sw_front storyboard segue identifier is used for the front viewController. Or the 1st viewController of the left silde menu list. But there has also a segue identifier in the main source file ("SlideOutMenuFiles") which is sw_right, and it never been used any where in the code. So I am assuming, it could be used to implement the right side sliding.

I try to implement it in right side but can't do it. If any one understand my want or familiar with the problem, any suggestion would be much appreciable. Thanks a lot for your time. Have a good day.

If you want "here" is my demo project. Take have a look.

(Addition: Please don't suggest any 3rd party API. I already tried with them.)

enter image description here

3

There are 3 answers

1
Ramaraj T On BEST ANSWER

You have already did it for the left side, I am not sure what's the issue u are facing to implement the same for the right side.

Simple put another button in the BangladeshViewController and add its action to the rightRevealToggle: and also add a new controller for the right side menu and connect it with the SWRevealViewController, give the custom segue name as "sw_right".

Just exactly like you did for the left side.

enter image description here

2
ios developer On

You can check code here

or

git code

Hope this help you!

1
Yuvrajsinh On

For Right side menu:

  1. Drag-and-drop new UIViewController or UINavigationController as per your need in Storyboard.

  2. Link new Controller with Segue from RevealViewController as SWRevealViewControllerSegue as you already did for MenuViewController and give it id 'sw_right'.

  3. You are done.

Run the project and you can access new Right side menu by swipe left.