Pregunta

I have used a fairly common design pattern for a standard IOS slide out navigation. I based the design off of the example found here: http://www.raywenderlich.com/32054/how-to-create-a-slide-out-navigation-like-facebook-and-path. The basic design takes four view controllers, a center view controller, a left view controller, a right view controller and a main container view controller to hold and manage the three other views. The main container places the center controller on top and when the user slides his or thumb left or right, the view slides over to display the appropriate controller beneath. I recently adapted this to a project that has almost thirty different controllers. I have it working with the initial view but am wondering what is the best way to scale this feature? I want this slide-out navigation to be available on every single page so the user can just slide and navigate to anywhere at all times. The right and left view controllers will always be the same no matter what controller your on, is there a way to have a common main container that dynamically loads the center controller depending on the view the user is on? Or do I need to go and implement a container controller for every single controller I want to have the slide-out navigation functionality? Obviously I would think the first method would be the most efficient and scalable, but I have no idea how I could do that or if it is even possible.

¿Fue útil?

Solución

An easy way to have a side slide out navigation is to intergrate opensource code into your project. The code normally comes with directions on how to implement it and a demo app.

Here is an example of an opensource slide nav like facebooks

mfsidemenu

The website this link takes you to (www.cocoacontrols.com) has some great opensource iOS controls as well!

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top