• Stars
    star
    107
  • Rank 323,587 (Top 7 %)
  • Language
    Objective-C
  • License
    MIT License
  • Created about 8 years ago
  • Updated over 5 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

LMSideBarController is a simple side bar controller inspired by Tappy and Simon Hoang.

LMSideBarController

LMSideBarController is a simple side bar controller inspired by Tappy and Simon Hoang.

               

Features

  • Side bar controller with blur+transform3D effect.
  • Support both left and right bar controller with different side bar styles.
  • Pan Gesture available.
  • Expandable structure.

Requirements

  • Xcode 8 or higher
  • iOS 8.0 or higher
  • ARC

Installation

From CocoaPods

pod 'LMSideBarController'

Manually

  • Drag the LMSideBarController folder into your project.
  • Add #include "LMSideBarController.h" to the top of classes that will use it.

Usage

You can subclass LMSideBarController and setup it in awakeFromNib method.

// Init side bar styles
LMSideBarDepthStyle *sideBarDepthStyle = [LMSideBarDepthStyle new];
sideBarDepthStyle.menuWidth = 220;
    
// Init view controllers
LMLeftMenuViewController *leftMenuViewController = [self.storyboard instantiateViewControllerWithIdentifier:@"leftMenuViewController"];
LMRightMenuViewController *rightMenuViewController = [self.storyboard instantiateViewControllerWithIdentifier:@"rightMenuViewController"];
LMMainNavigationController *navigationController = [self.storyboard instantiateViewControllerWithIdentifier:@"mainNavigationController"];
    
// Setup side bar controller
[self setPanGestureEnabled:YES];
[self setDelegate:self];
[self setMenuViewController:leftMenuViewController forDirection:LMSideBarControllerDirectionLeft];
[self setMenuViewController:rightMenuViewController forDirection:LMSideBarControllerDirectionRight];
[self setSideBarStyle:sideBarDepthStyle forDirection:LMSideBarControllerDirectionLeft];
[self setSideBarStyle:sideBarDepthStyle forDirection:LMSideBarControllerDirectionRight];
[self setContentViewController:navigationController];

You can present it manually:

[self.sideBarController showMenuViewControllerInDirection:LMSideBarControllerDirectionLeft];

or hide it:

[self.sideBarController hideMenuViewController:YES];

See sample Xcode project in /LMSideBarControllerDemo

License

LMSideBarController is licensed under the terms of the MIT License.

Contact

Minh Luong Nguyen

Donations

paypal