Giter VIP home page Giter VIP logo

lmsidebarcontroller's Introduction

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

lmsidebarcontroller's People

Contributors

lminhtm avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.