I will provide you with some steps to create left/right/both slider menus in your app with Objective C. You can simply Download and use it in your project.
Here are the steps:
- Open Xcode.
- Click on Create a new Xcode project.
- Now select Single View Application.
- Click -> Next.
- Enter -> Product Name and Other blank fields (if any).
Now select the location where you want to save your project and click on Create.
Now Download the files from top and open it.
Drag these files in your project
Must For Sliding operation:
- SWRevealViewController.h
- SWRevealViewController.m
- NavigationViewController.h
- NavigationViewController.m
- RightViewController.h
- RightViewController.m
- menu1.png
- leftMenu.jpg
- rightMenu.jpg
Now you will get a prompt to Choose options for adding these files.
Make sure these are selected:
- Copy items if needed.
- Create folder references.
- Add to targets: Name of your project (first one).
Click -> Finish.
Write/copy the following code in ViewController.h.
- #import <UIKit/UIKit.h>
- @interface ViewController : UIViewController
- @property (weak, nonatomic) IBOutlet UIBarButtonItem *Leftbarbutton;
- @property (weak, nonatomic) IBOutlet UIBarButtonItem *Rightbarbutton;
- @end
- #import "ViewController.h"#
- import "SWRevealViewController.h"@
- interface ViewController()@ end@ implementation ViewController - (void) viewDidLoad
- {
- [super viewDidLoad];
- // Do any additional setup after loading the view, typically from a nib.
- // To Set Title on Navigation/Top Bar
- self.title = @"Welcome";
- //Left slidebutton
- _Leftbarbutton.target = self.revealViewController;
- _Leftbarbutton.action = @selector(revealToggle: );
- // For Pan gesture(Left Side)
- [self.view addGestureRecognizer: self.revealViewController.panGestureRecognizer];
- //Right slidebutton
- _Rightbarbutton.target = self.revealViewController;
- _Rightbarbutton.action = @selector(rightRevealToggle: );
- // For Pan gesture(Right Side)
- [self.view addGestureRecognizer: self.revealViewController.panGestureRecognizer];
- } - (void) didReceiveMemoryWarning
- {
- [super didReceiveMemoryWarning];
- // Dispose of any resources that can be recreated.
- }@
- end





Asfend YarPosted Mar 3, 2016, 3:33 PM
good
Santhakumar MunuswamyPosted Nov 20, 2015, 9:14 AM
Good One
Sibeesh VenuPosted Nov 20, 2015, 4:40 AM
Nice Share
Debasis SahaPosted Nov 19, 2015, 6:44 AM
Nice article..