Saturday, July 18, 2015

iOS Creating a Slide out navigation Panel - Exploring One of the concepts

Thought to take a look into how the slide out navigation panel concept is implemented in other applications. Just to see how different this is from one of the concept already implemented one of the project done. 

Below were the initial steps followed 

- As per the tutorial, downloaded the starter project 
- Opened the project and it had three folders Assets, Views, Classes

There are main 4 classes in the project

- MainViewController 
- CenterViewController 
- LeftPanelViewController 
- RightPanelViewController 

The project seems to be using the View Controller Containment concept introduced in the iOS 5.0.

The main Idea behind the implementation is: 

- The center view controller is the applications main view controller. To the main view controller, the view of the center view controller is added. 
- Whenever the left menu view to be shown, the LeftPanelViewController instance is created and its view is added on to the MainViewController and added as a child view controller to the main view controller. 
- The center view controller is now given a shadow to give a cool effect. 
- When the animation to be performed. The left panel view is sent to back and the Central view controller is animated to the right direction. 


Thats all! 

The concept is pretty much same as implemented in one of my app. But the header bar was common to entire project as the project had many number of view controllers. 

the project with a screenshot is like below. 



References:

No comments:

Post a Comment