I am developing a navigation based application in iPhone.
In which I want to create physical menu button like menu like the one in Android phones.
The menu can be accessed from any view in the hierarchy.
Do any one have any idea how can we achieve this .
Can we add a drawer like menu to UINavigationBar ?
Please don’t suggest the tabbarcontroller as it is the last option.
What you should do is create a subclass of
UIViewController, e.g.MasterViewController. Have all of the view controllers subclassMasterViewController. In theMasterViewControlleryou can write code to create and display your drawer view, and then all of your view controllers will inherit that code and can call it on themselves at any point.To slide the view in:
drawerView.frame = CGRectMake(0, -1*drawerView.frame.size.height, self.view.frame.size.width, whateverHeight);[UIView beginAnimations:nil context:NULL];drawerView.frame = CGRectMake(0, 0, self.view.frame.size.width, whateverHeight);[UIView commitAnimations];