Tuesday, 16 February 2016

Custom Right Side Slide Out Menu in iOS

In this tutorial , i will tell you about how to implement Custom right side menu in Objective c . Slide out menu is similar to what you see in popular apps like Facebook , Gmail .

Step 1 :   Create a new project and save it to the desired location.

New project

Step 2:   Add MFSideMenu to the project.

1.    Close the project which you have created.

2.    Go to  MFSideMenu to add it to your project.

3.    For installing pods , Open terminal in your mac.
       i) Open your project by writing `cd name of the project`  .
       ii) Write pod init.
       iii) Write open -a Xcode PodFile
       iv) Add pod to your pod file     pod 'MFSideMenu' 
       v)  Close the pod file and write pod install to install pod in terminal.

Step 3:  Open Workspace

      i) After pod installation , close the terminal window. A new workspace is created for your project.
     ii) Open the workspace. 

Step 4:  Open Main.storyboard and embed a new navigation controller in it .

         i) Add the title to your viewController and drag a UIBarButton to the right side of the                    navigation controller (name it as MENU) 


       ii)   Make its connection (as action) with the Viewcontroller .

Step 5 :  Create a helper class which will contain the elements of the slide out menu .

      i)     On Xcode,  hit cmd + n and add a new tableViewController to your project .   
     ii)     Add the following code in your tableviewController 

Step 6 : Open AppDelagate.h and add the following code :

     i)     Open Main.StoryBoard and app the identifier to it . (e.g. : myStory).

Add caption

   ii)     In appDelegate.m add the following code :

  iii)     Now , open ViewController.m and the following code :

For MFSideMenu Action :

Thats all about Slide Out Menu in iOS .

Thank you .:) 

Read about APNS (Apple Push Notification Service)

Read about POST data using NSURLSession

1 comment:

  1. Thanks for this beautiful post IOS. It is really good for the beginners and I also liked the post.
    IOS Training in Bangalore
    IOS Training in Marathahalli