Setting up a basic app with SWRevealViewController

suggest change

Create a basic application with single view application template with swift as language

Add SWRevealViewController.h and SWRevealViewController.m

then click on Create Bridging Header button

and add

#import "SWRevealViewController.h"

on the Bridging header

Then select viewController on storyboard and change class to SWRevealViewController

Then rename the viewController on files to MainViewController and add new ViewController with RightViewController name

then we add two segues from SWRevealViewController to MainViewController and from SWRevealViewController to RightViewController, then we need to select the first (from SWRevealViewController to MainViewController) and edit properties

on identifier set sw_front on Class set SWRevealViewControllerSegueSetController

after this we need to do the same with the segue (from SWRevealViewController to RightViewController)

on identifier set sw_rear on Class set SWRevealViewControllerSegueSetController

then on MainViewController add this line on viewDidLoad method


And this is all, you have a basic app with SWRevealViewController integrated, you can swipe to right to show RightViewController as lateral menu

Feedback about page:

Optional: your email if you want me to get back to you:

Table Of Contents