All Projects → aperechnev → SidebarOverlay

aperechnev / SidebarOverlay

Licence: MIT license
Yet another implementation of sidebar menu, but here your menu appears over the top view controller.

Programming Languages

swift
15916 projects
ruby
36898 projects - #4 most used programming language
objective c
16641 projects - #2 most used programming language

Projects that are alternatives of or similar to SidebarOverlay

Pushy
Pushy is a responsive off-canvas navigation menu using CSS transforms & transitions.
Stars: ✭ 1,488 (+2154.55%)
Mutual labels:  navigation, menu
Layerjs
layerJS: Javascript UI composition framework
Stars: ✭ 1,825 (+2665.15%)
Mutual labels:  navigation, menu
Draggablemenu
A draggable menu that shows a thumbnail preview of an image grid
Stars: ✭ 117 (+77.27%)
Mutual labels:  navigation, menu
Eeh Navigation
An AngularJS menu module.
Stars: ✭ 74 (+12.12%)
Mutual labels:  navigation, menu
Dropdownmenukit
UIKit drop down menu, simple yet flexible and written in Swift
Stars: ✭ 246 (+272.73%)
Mutual labels:  navigation, menu
Promotion Menu
RubyMotion gem allowing you to easily setup a facebook or Path style hidden slide menu easily with the ProMotion gem.
Stars: ✭ 78 (+18.18%)
Mutual labels:  navigation, menu
React Command Palette
An accessible browser compatible javascript command palette
Stars: ✭ 140 (+112.12%)
Mutual labels:  navigation, menu
Simple Navigation
A ruby gem for creating navigations (with multiple levels) for your Rails, Sinatra or Padrino applications. Render your navigation as html list, link list or breadcrumbs.
Stars: ✭ 868 (+1215.15%)
Mutual labels:  navigation, menu
Mmenu Js
The best javascript plugin for app look-alike on- and off-canvas menus with sliding submenus for your website and webapp.
Stars: ✭ 2,535 (+3740.91%)
Mutual labels:  navigation, menu
Hc Offcanvas Nav
JavaScript library for creating toggled off-canvas multi-level navigations, allowing endless nesting of submenu elements, supporting swipe gestures, keyboard interactions and ARIA attributes.
Stars: ✭ 201 (+204.55%)
Mutual labels:  navigation, menu
React Responsive Navbar
Nothing crazy, nothing flashy, just a simple, flexible & completely customisable responsive navigation bar component.
Stars: ✭ 42 (-36.36%)
Mutual labels:  navigation, menu
SideMenuSwiftDemo
SideMenu in Swift with autolayout
Stars: ✭ 79 (+19.7%)
Mutual labels:  menu, sidebar-menu
Material Bottom Nav
A bottom navigation bar adhering to the Material Design specification.
Stars: ✭ 41 (-37.88%)
Mutual labels:  navigation, menu
Bootstrap Dropdown Hover
Bootstrap based responsive mulltilevel dropdown navigation menu with fascinating animations
Stars: ✭ 115 (+74.24%)
Mutual labels:  navigation, menu
Jquery Menuflip
Create animated flipping menu links with this extremely lightweight jQuery plugin.
Stars: ✭ 39 (-40.91%)
Mutual labels:  navigation, menu
Quickmenu
The new era of mobile navigation for the web, we're out of hamburgers.
Stars: ✭ 119 (+80.3%)
Mutual labels:  navigation, menu
Luxbar
🍸 Featherweight, Responsive, CSS Only Navigation Bar
Stars: ✭ 663 (+904.55%)
Mutual labels:  navigation, menu
Menu
Menu and sidebar management package for Laravel
Stars: ✭ 6 (-90.91%)
Mutual labels:  navigation, menu
React Site Nav
A kick ass site menu powered by styled components inspired by Stripe.
Stars: ✭ 155 (+134.85%)
Mutual labels:  navigation, menu
Side Menu.ios
Animated side menu with customizable UI
Stars: ✭ 2,702 (+3993.94%)
Mutual labels:  navigation, menu

SidebarOverlay

codebeat badge Join the chat at https://gitter.im/aperechnev/SidebarOverlay Travis CI CocoaPods CocoaPods CocoaDocs codecov.io

SidebarOverlay is an implementation of sidebar menu, similar to ECSlidingViewController. The difference is that in SidebarOverlay the sidebar menu covers the top view when user opens it, like on the picture below:

SidebarOverlay application example

Installation

The easiest way to start development using SidebarOverlay is to install it via CocoaPods. Just add it to your Podfile:

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'

pod 'SidebarOverlay'

Getting Started

It's quit simple to start developing with SidebarOverlay. First, we have to create three view controllers on our storyboard:

  • container view controller
  • top view controller
  • side view controller

The container view controller is the root view controller that makes all magic for us. It's necessary to subclass SOContainerViewController and assign it to our container view controller. Then we can setup top and side view controllers:

import SidebarOverlay

class ContainerViewController: SOContainerViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
    
        self.menuSide = .Right
        self.topViewController = self.storyboard?.instantiateViewControllerWithIdentifier("topScreen")
        self.sideViewController = self.storyboard?.instantiateViewControllerWithIdentifier("leftScreen")
    }

}

Set the container view controller as initial on your storyboard and your basic application with sidebar is ready to run.

Open sidebar menu programatically

It's always good if user is able to open sidebar menu not only by swipe gesture, but also by tap on menu button. To open sidebar menu programatically, set isSideViewControllerPresented property of container view controller to true:

class TopViewController: UIViewController {
    
    @IBAction func showMeMyMenu () {
        if let container = self.so_containerViewController {
            container.isSideViewControllerPresented = true
        }
    }

}

As you see, we have property named so_containerViewController. This property is automatically added to all view controllers and you're able to access it everywhere.

To close the sidebar menu, just set the isSideViewControllerPresented property to false.

Changing top view controller from the sidebar menu

Since you've implemented your sidebar menu on the left view controller, you need to show different top view controllers each time user chooses an item in menu. It's pretty simple. Just set the topViewController property of container view controller:

// Table view delegate method that invokes when user chooses an item in UITableView
func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) {
    let profileViewController = self.storyboard!.instantiateViewControllerWithIdentifier("profileViewController")
    self.so_containerViewController.topViewController = profileViewController
}

How To Contribute

Please follow the git-flow notation and make sure that all tests are passing before contributing. Your questions and pull requests are welcome.

Code coverage

codecov.io

Versioning

We are using semantic versioning.

Support

If you need some help, you can join our gitter room.

License

SidebarOverlay is released under the MIT license. See LICENSE for details.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].