Kamlesh Shingarakhiya
Kamlesh Shingarakhiya

Reputation: 2777

How to set Viewcontroller before SWRevealViewController

I want to add SWRevealViewController before my V1 and V2 controller. I don't know how to initiate the reveal-controlle.I added screen shots of my storyboard so its easy to understands all.enter image description here

Upvotes: 1

Views: 600

Answers (2)

Jigar
Jigar

Reputation: 1821

first extend your vc3 in any class.than apply storyboard identifier name in vc3. write code in vc2 button click action method

vc3 *secondViewController =
    [self.storyboard instantiateViewControllerWithIdentifier:@"storyboardidentifier name"];
[self presentViewController:second animated:YES completion:NULL];

Upvotes: 2

Akash KR
Akash KR

Reputation: 798

Follow this link

http://www.appcoda.com/ios-programming-sidebar-navigation-menu/

Do as it says. In the view controller where you want your slide out menu use this

    [menuBtn addTarget:self.revealViewController action:@selector(revealToggle:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addGestureRecognizer:self.revealViewController.panGestureRecognizer];

Make reveal view controller your initial view controller.

Upvotes: 0

Related Questions