A simple side menu for iOS written in Swift.

Related tags

Menu ENSwiftSideMenu
Overview

ENSwiftSideMenu

A lightweight flyover side menu component for iOS with the UIDynamic's bouncing animation, UIGestures and UIBlurEffect. Allows you to use native UINavigationController's logic to manage view controllers. The component is written in Swift.

Requirements

  • iOS 9 or higher

Installation

CocoaPods

The recommended way for installating ENSwiftSideMenu is via the CocoaPods package manager

platform :ios, '9.0'
pod 'ENSwiftSideMenu', '~> 0.1.4'

Manual Install

All you need is import ENSideMenu.swift and ENSideMenuNavigationController.swift to your project folder.

Usage Example

  1. Create a root UINavigationController subclassing from ENSideMenuNavigationController
  2. Create a UIViewController for your side menu
  3. Initilize the menu view with a source view and menu view controller:
override func viewDidLoad() {
  super.viewDidLoad()
  sideMenu = ENSideMenu(sourceView: self.view, menuViewController: MyMenuViewController(), menuPosition:.Left)
  // show the navigation bar over the side menu view
  view.bringSubviewToFront(navigationBar)
}
  1. To change content view controller use next line in your menu view controller:
sideMenuController()?.setContentViewController(destViewController)
  1. Check example project for more explanation

License

The MIT License (MIT)

Copyright (c) 2014 Evgeny Nazarov

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Comments
  • a new viewcontroller instance is made

    a new viewcontroller instance is made

    first of all, great work!!!

    I am looking for a way for the menu to pop a previously visited view controller at it's latest state, not to instantiate a new one... any tips?

    opened by ispiropoulos 9
  • Load next view

    Load next view

    Hi great work with your sample to sideMenu, i have a problem but i need move to next viewController but not find to func for to call next view for to work to current flow control

    opened by ingscjoshua 7
  • Show at startup?

    Show at startup?

    Is there a way to show the Menu on launching the app __ not having to wait for the first swipe.

    I poked around but could not find that piece of code to change.

    PS, Great piece of work here!, would be super helpful (and a great teaching tool) to have an "infographic" explaining how it all works (interconnects). How all the pieces talk to each other (I'm still a Swift beginner). There is lots of code, just trying to get my brain wrapped around it.

    thanks, ed

    opened by ejpusa-zz 6
  • Incorrect behavior when screen rotates

    Incorrect behavior when screen rotates

    When the screen rotates the menu does not update it's position, that leads to it to be visible if hidden and in the wrong place. It also makes it disappear if you try to hide/show it. I'm making a pull request to fix it.

    opened by ncerezo 6
  • How to show/disable sidemenu based on current screen?

    How to show/disable sidemenu based on current screen?

    Hi guys,

    How can i disable ENSwiftSideMenu from being shown (dragged in from the edge) if they're on a given screen? For example i don't want to show the sidemenu on login screen but other screens user can use the sidemenu. Any ideas?

    opened by younanjo 4
  • height of menu if orientation is changed

    height of menu if orientation is changed

    Great work, I really enjoy the menu! However I have a small problem if the menu is open and the orientation is changed from portrait to landscape. The menu position works fine, but the scrolling of the menu is not enabled if there are a lot of entries. To reproduce this just create a menu with 10 or more entries, so that not all are directly visible in landscape mode. I tried to change the height of the sidemenu tableview, but couldn't quite get a working soltion since I am pretty new to mobile programming. Hope someone has a suggestion to solve this problem. Keep up the good work

    opened by simonsiedler 4
  • Can I use with Obj-C?

    Can I use with Obj-C?

    Im trying to use with my objc project but have a problem with calling

    sideMenu = ENSideMenu(sourceView: self.view, menuTableViewController: MyMenuTableViewController(), menuPosition:.Left)

    Any suggestion?

    Very cool sidemenu. Thank you very very much.

    opened by Pokotuz 4
  • Menu bouncing

    Menu bouncing

    Excuse me, i'm not new to obj-c, but new to swift, so can't understand how to disable side menu bouncing? It's really annoying. Looks like you make menu to act like a real physical body, but when i try to play with it density, elasticity and so on, but nothing happens or it just throw menu out of screen bounds) Please help me!

    opened by caravaneer404 4
  • Center controller

    Center controller

    Hi I have did a small change so that your class can support iOS7 as well.It has been there in one of the issues as well and I commented over there as well.

    opened by kn-neeraj 4
  • slide gesture booleans not working appropriately

    slide gesture booleans not working appropriately

    I have been trying to disable the menu on certain view controllers by returning false on func sideMenuShouldOpenSideMenu() -> Bool. If I try to swipe the menu open multiple times, it will begin working.

    Additionally, if I disable the swipe gestures in EnSideMenu.swift, (set booleans to false), trying a combination of swipes and toggling from the menu button will cause the menu to work from swipes.

    No specific combination of toggle button and gestures seem to cause the break.

    These issues are easily recreated in the provided example project.

    opened by bass4aj 3
  • Fixed 'Expected type after as'

    Fixed 'Expected type after as'

    I've had problems with ENSideMenu.swift, where it gives the "Expected type after 'as'" error, and am hoping this will fix it for some.

    I'm using Xcode 6.2.

    Thanks!

    opened by Naoto-Ida 3
  • Usage improvements

    Usage improvements

    This PR adds a few improvements I came up using the side menu in my project

    • delegate method to know when the menu is animating: useful to update status bar appearance when the menu is dark and the VC light or vice versa
    • property to hide / disable the menu completely: useful when you want to have the menu enabled in your root VC but not in any pushed VCs
    • exposing a property to know if the side menu is opened or not when not using the custom navigation controller
    opened by igorkulman 0
  • side menu not open

    side menu not open

    if it is possible to present the side menu it's not working actually... am doing ecommerce project after the order done am push to home page..when am reach home page that time i click the side menu it will not open and it happened all pages after the order complete.

    opened by parveenBanuS 0
  • Navigate to back pop view controller ??

    Navigate to back pop view controller ??

    Hello, I have used the ENSwiftSideMenu and navigated to the second view controller but I was facing an issue like when I want to go back to my parent view from child view how can I go using popViewController , Normally by using NavigationController we used to go back self.navigationController?.popViewController(animated:true) , but here how can I go please help me asap urgent .!!!

    opened by ShaikBaji1506 0
  • Download Swift 4 Version

    Download Swift 4 Version

    Error I get when installing new pod.

    [!] CocoaPods could not find compatible versions for pod "ENSwiftSideMenu": In Podfile: ENSwiftSideMenu (~> 0.1.3)

    How can I work around this?

    opened by Cez95 0
Releases(0.0.1)
Owner
Evgeny Nazarov
Evgeny Nazarov
A simple side menu for iOS written in Swift.

ENSwiftSideMenu A lightweight flyover side menu component for iOS with the UIDynamic's bouncing animation, UIGestures and UIBlurEffect. Allows you to

Evgeny Nazarov 1.8k Dec 21, 2022
A simple customizable side menu written in SwiftUI.

NSideMenu Description A simple customizable side menu written in SwiftUI. Give a Star! ⭐ Feel free to request an issue on github if you find bugs or r

null 5 Oct 10, 2022
iOS Interactive Side Menu written in Swift.

Interactive Side Menu A customizable, interactive, auto expanding and collapsing side menu for iOS written in Swift. Here are some of the ways Interac

Handsome 706 Dec 15, 2022
A side menu controller written in Swift for iOS

Description SideMenuController is a custom container view controller written in Swift which will display the main content within a center panel and th

Teo 1.2k Dec 29, 2022
Beautiful iOS side menu library with parallax effect. Written in Swift

AKSideMenu AKSideMenu is a double side menu library with parallax effect. Example Project See the contained examples to get a sample of how AKSideMenu

Diogo Autilio 280 Dec 6, 2022
Simple side/slide menu control for iOS, no code necessary! Lots of customization. Add it to your project in 5 minutes or less.

▤ SideMenu If you like SideMenu, give it a ★ at the top right of this page. SideMenu needs your help! If you're a skilled iOS developer and want to he

Jon Kent 5.4k Dec 29, 2022
Simple side option menu with clean code princibles

SwiftUISideMenu Simple side option menu with clean code princibles.

Mehmet Karanlık 12 May 23, 2022
iOS 7/8 style side menu with parallax effect.

RESideMenu iOS 7/8 style side menu with parallax effect inspired by Dribbble shots (first and second). Since version 4.0 you can add menu view control

Roman Efimov 7.2k Dec 28, 2022
Library provides easy to implement variation of Android (Material Design) Floating Action Button for iOS. You can use it as your app small side menu. 🌶

RHSideButtons ?? Library provides easy to implement variation of Android (Material Design) Floating Action Button for iOS. You can use it as your app

Robert Herdzik 166 Nov 14, 2022
Animated side menu with customizable UI

Side Menu Animated side menu with customizable UI. Made in Yalantis. Check this project on dribbble. Check this project on Behance. Requirements iOS 7

Yalantis 2.7k Dec 27, 2022
A Slide Menu, written in Swift, inspired by Slide Menu Material Design

Swift-Slide-Menu (Material Design Inspired) A Slide Menu, written in Swift 2, inspired by Navigation Drawer on Material Design (inspired by Google Mat

Boisney Philippe 90 Oct 17, 2020
Slide-Menu - A Simple Slide Menu With Swift

Slide Menu!! Весь интерфейс создан через код

Kirill 0 Jan 8, 2022
Swift-sidebar-menu-example - Create amazing sidebar menu with animation using swift

 SWIFT SIDEBAR MENU EXAMPLE In this project I create a awesome side bar menu fo

Paolo Prodossimo Lopes 4 Jul 25, 2022
EasyMenu - SwiftUI Menu but not only button (similar to the native Menu)

EasyMenu SwiftUI Menu but not only button (similar to the native Menu) You can c

null 10 Oct 7, 2022
Hamburger Menu Button - A hamburger menu button with full customization

Hamburger Menu Button A hamburger menu button with full customization. Inspired by VinhLe's idea on the Dribble How to use it You can config the looks

Toan Nguyen 114 Jun 12, 2022
UIKit drop down menu, simple yet flexible and written in Swift

DropDownMenuKit DropDownMenuKit is a custom UIKit control to show a menu attached to the navigation bar or toolbar. The menu appears with a sliding an

Quentin Mathé 258 Dec 27, 2022
iOS Slide Menu View based on Google+, iQON, Feedly, Ameba iOS app. It is written in pure swift.

SlideMenuControllerSwift iOS Slide View based on iQON, Feedly, Google+, Ameba iPhone app. Installation CocoaPods pod 'SlideMenuControllerSwift' Carth

Yuji Hato 3.3k Dec 29, 2022
ExpandingMenu is menu button for iOS written in Swift.

ExpandingMenu ExpandingMenu is written in Swift. Requirements iOS 8.0+ Xcode 10.0+ Swift 3.x+ Installation CocoaPods You can install CocoaPods with th

null 454 Dec 7, 2022
iOS Slide Menu Controller. It is written in pure swift.

SlideMenuController Requirements iOS 9+ Installation SlideMenuController is available through CocoaPods. To install it, simply add the following line

Myung gi son 40 Jan 16, 2022