Question

I'm going to be developing an Application that uses a 'sidebar' similar to the one on popular applications such as Gmail and Facebook. What I am curious about however, is how view controllers are managed in these situations. The way I have seen using the Storyboard, you create segues between view controllers, but I don't see how this would work with a sidebar that lets you access many different view controllers.

Do I have to take a different approach with this such as using a Navigation Controller or something? If so, how would I approach this, given that I have a but on the navigation bar that pulls out a side view. I'm concerned about memory management and don't exactly know how to tackle this so any help will be appreciated.

Thanks!

Was it helpful?

Solution 2

you can use this function to navigate in your storyBoard :

UIViewController *destinationViewController = [self.storyboard instantiateViewControllerWithIdentifier:@"MyNextViewController"];
[self.navigationController pushViewController:destinationViewController animated:YES];

And specify the identifier of your UIViewController like that :

enter image description here

OTHER TIPS

Your slide viewController should stay in memory to slide it fast from the left or the right side, if you create the viewController every time then the slide animation might be slower than what you wanted. You should have completely custom views here. I would recommend you to use one of the open source libraries available in the internet instead of going through the work to implement it.
Here is an example: https://www.cocoacontrols.com/controls/msnavigationpaneviewcontroller
And one more: https://www.cocoacontrols.com/controls/skslideviewcontroller

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top