In this tutorial, we are going to cover some of the quick and easy way of adding a side menu to your iOS app.
Firstly, let me introduce you to http://www.cocoacontrols.com, this is repository that provides a bunch of custom controls that are designed for iOS and Mac OSx. Sometimes we should not reinvent the wheel, but harness the power of the internet and community around.
Next, we are going use cocoa pods, if you are not sure what that is, head over to the following url -> Raywenderlich’s intro to cocoapod
So I have choose, RESideMenu, an amazing and beautiful control. GitHub – RESideMenu.
Getting Started – Adding RESideMenu to your project
- Adding the library into your project, if you have a pod file add the following:
pod 'RESideMenu', '~> 4.0.7'
- Within your Terminal, browse to your XCode project location and type the following:
- Xcode should generate a xcworkspace extension for you. Moving forward you should be only using this file.
Getting RESideMenu to work
Let create the following files in your project.
- RootViewController – Add New File -> Cocoa Touch Class
- HomeController – Add New File -> Cocoa Touch Class
The above should inherit UIViewController.
Next in your Main.Storyboard, add the following:
It should look like below after you are done.
In the next post, I am going to show you what we need to configure.