Fadi Obaji
Fadi Obaji

Reputation: 1494

iOS: SWRevealViewController and multiple NavigationControllers

I'm new to iOS development and i was looking for a side-menu technique to use in my application (something similar to NavigationDrawer in android) after i did my researches i was very impressed by the SWRevealViewController controller, but i have encountered this problem:

Subject: SWRevealViewController

Problem: I want when a user clicks on a cell (in the side-menu table view) to segue to another view scene and let this scene to be able to reveal the side menu as well (exactly like the original view scene).

Possible: Do i have to create another root view and make two custom segues, one linked with another side-menu and the other one linked to another navigation controller like i did with original view scene? (which is very lame solution)

Reference: Please see the image below

My Question: What should be instead of the question marked view scene in the image below?

Thanks in advance.

Storyboard screenshot

Upvotes: 1

Views: 595

Answers (1)

André Slotta
André Slotta

Reputation: 14030

there should not be a segue from your sidebar controller to any other viewcontroller. instead in your sidebar controllers didSelectRowAtIndexPath you should create the targetviewcontroller (depending on the indexpath) and then show it using

self.revealViewController pushFrontViewController:targetViewController animated:YES;

feel free to ask if anything is unclear. :)

Upvotes: 1

Related Questions