Latest 1.0.0
Homepage https://github.com/vascome/VPSlideMenu
License MIT
Platforms ios 9.0
Authors

Menu View Controller. It has left, right and main view controllers. Supported tap and pan gestures. Supported storyboards

Platform
License

iOS Slide View

VPSlideMenu

Installation

CocoaPods

pod 'VPSlideMenu'

Carthage

if iOS8 or later, Carthage is supported

  • Add github "vascome/VPSlideMenu" to your Cartfile.
  • Run carthage update.

for more info, see Carthage

Manually

Add the VPSlideMenu files to your project.

Usage

Setup

Add #import <VPSLideMenu/VPSlideMenu.h> in your file

Manual:


    UIStoryboard *sBoard = [UIStoryboard storyboardWithName:@"Main" bundle:[NSBundle mainBundle]];

    UIViewController *mainVC = [sBoard instantiateViewControllerWithIdentifier:@"MainVC"];
    LeftViewController *leftVC = (LeftViewController*)[sBoard instantiateViewControllerWithIdentifier:@"LeftVC"];
    UIViewController *rightVC = [sBoard instantiateViewControllerWithIdentifier:@"RightVC"];

    UINavigationController *nvc = [[UINavigationController alloc] initWithRootViewController:mainVC];
    leftVC.mainViewController = nvc;

    VPSlideMenuViewController *slideMenuController = [[VPSlideMenuViewController alloc] initWithMainViewController:nvc leftViewController:leftVC rightViewController:rightVC];
    [slideMenuController setAutomaticallyAdjustsScrollViewInsets:YES];

    AppDelegate *app = (AppDelegate*)[[UIApplication sharedApplication] delegate];
    app.window.rootViewController = slideMenuController;

Storyboard Support

  1. put VPSlideMenuViewController in a storyboard.
  2. add left, right and main vc (see project example)
    • setup in code
      VPSlideMenuViewController *vc = [[UIStoryboard storyboardWithName:@"Main" bundle:[NSBundle mainBundle]] instantiateInitialViewController];
      AppDelegate *app = (AppDelegate*)[[UIApplication sharedApplication] delegate];
      ((LeftViewController*)vc.leftVC).mainViewController = vc.mainVC;
      app.window.rootViewController = vc;

You can access from UIViewController

[self slideMenuController]

add navigationBarButton

[self addLeftBarButtonWithImage:[UIImage imageNamed:@"left"]];
[self addrightBarButtonWithImage:[UIImage imageNamed:@"right"]];

License

VPSlideMenu is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "VPSlideMenu",
    "version": "1.0.0",
    "summary": "Menu View Controller. It has left, right and main view controllers. Supported tap and pan gestures. Supported storyboards",
    "homepage": "https://github.com/vascome/VPSlideMenu",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Vasily Popov": "[email protected]"
    },
    "source": {
        "git": "https://github.com/vascome/VPSlideMenu.git",
        "tag": "1.0.0"
    },
    "platforms": {
        "ios": "9.0"
    },
    "source_files": "VPSlideMenu/*.{h,m}"
}

Pin It on Pinterest

Share This