How to use SWRevealViewController with RBStoryboardLink .

Posted in: Blog

UIStoryboards are very powerful and handy. If you want to take full advantage of storyboards, you should break them down to natural modules. But the problem with having many storyboards is that you need to write the code to move between them. To overcome this difficulty RBStoryboardLink allows you “pseudo-segues” between UIStoryboards. The good thing about these segues is that they can be created without leaving Interface Builder or having to write any extra code.

One of our client was facing problem while navigating between different app screens. Storyboards can get you into a lot of trouble especially when your app is big and it takes time to find the root cause of the problem. We solved this navigation problem by integrating SWRevealViewController with RBStoryboardLink.

Using SWRevealViewController with RBStoryboardLink is not an easy process. To make them work together you need to follow the steps given below:

  • Setup the SWRevealViewController as menu using the SWRevealViewController segue according to SWRevealViewController guideline for the storyboard
  • Create an RBStoryboardLink to the SWRevealViewController menu

 

st

  •  Create a custom segue to RBStoryboardLink from the parent view controller

 

dd

  • Create segue class by extending the RBStoryboardModalSegue for the above custom segue and override the perform method

 

ss

cc

One thought on “How to use SWRevealViewController with RBStoryboardLink

  1. In a main storyboard i’m using a SWRevealViewController for a sidebar with links to different sections.

Leave a Reply

Your email address will not be published. Required fields are marked *