Hamburger Menu Button - A hamburger menu button with full customization

Overview

Hamburger Menu Button

A hamburger menu button with full customization. Inspired by VinhLe's idea on the Dribble

Preview

How to use it

You can config the looks of the button through Xcode Inspector

Xcode Inspector

Or you can make a button on your own by doing this:

  let firstButton = MenuButton(frame: CGRectMake(100, 100, 60, 60))
  firstButton.addTarget(self, action: "buttonClick:", forControlEvents: UIControlEvents.TouchUpInside)
  firstButton.lineWidth = 30
  firstButton.lineMargin = 12
  firstButton.lineCapRound = true
  firstButton.thickness = 6
  firstButton.slideLeftToRight = false
  firstButton.backgroundColor = UIColor.purpleColor()
  firstButton.cornerRadius = 10
  self.view.addSubview(firstButton)

License

MIT license. See the LICENSE file for details.

You might also like...
Simple example of view that appears on tap button and  dismiss with swipe gesture.
Simple example of view that appears on tap button and dismiss with swipe gesture.

MenuWithSlide Simple SwiftUI example of how to show side menu with slide effect. On button press - appeares, on background tap or swipe right - dissmi

Slide Menu (Drawer) in Swift
Slide Menu (Drawer) in Swift

AKSwiftSlideMenu Slide Menu (Drawer) in Swift 5.0 Why to use a library everytime? Let's create our own Slide Menu in Swift 5.0 I have uploaded a video

⭕️ CircleMenu is a simple, elegant UI menu with a circular layout and material design animations. Swift UI library made by @Ramotion
⭕️ CircleMenu is a simple, elegant UI menu with a circular layout and material design animations. Swift UI library made by @Ramotion

CIRCLE MENU Simple, elegant UI menu with a circular layout and material design animations We specialize in the designing and coding of custom UI for M

A simple side menu for iOS written in Swift.
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

Menu with a circular layout based on Macaw
Menu with a circular layout based on Macaw

FanMenu Easily customizable floating circle menu created with Macaw We are a development agency building phenomenal apps. Usage Create UIView in your

Our Guillotine Menu Transitioning Animation implemented in Swift reminds a bit of a notorious killing machine.
Our Guillotine Menu Transitioning Animation implemented in Swift reminds a bit of a notorious killing machine.

GuillotineMenu.swift Inspired by this project on Dribbble Also, read how it was done in our blog Requirements iOS 8.0+ Xcode 10 Swift 5.0 (v 4.1+) Swi

iOS Interactive Side Menu written in Swift.
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

A menu based on Medium iOS app.
A menu based on Medium iOS app.

Medium 1.8.168 menu in Swift. That is still one of my favorite menus because that is easy to use and looks beautiful.

A paging menu controller built from other view controllers placed inside a scroll view (like Spotify, Windows Phone, Instagram)
A paging menu controller built from other view controllers placed inside a scroll view (like Spotify, Windows Phone, Instagram)

Unfortunately, life gets in the way sometimes and I won't be able to maintain this library any longer and upgrade this library to where it needs to be

Comments
  • Nice control, just more effect

    Nice control, just more effect

    Thank for nice control. But I wonder if you can make effect like this or give me a hint. https://lh3.googleusercontent.com/-k65ZhkNxr_8/VEPuNIAS_8I/AAAAAAAAuyQ/w6WY8Phkmb0/w506-h323/gif-arrow.gif

    question 
    opened by dzungpv 1
  • CGPathMoveToPoint deprecated in Swift 3

    CGPathMoveToPoint deprecated in Swift 3

    CGPathMoveToPoint have been deprecated in Swift 3, how to fix/style these paths

    var menuPath : CGPath {
        let path = CGPathCreateMutable()
        CGPathMoveToPoint(path, nil, thickness / 2, thickness / 2)
        CGPathAddLineToPoint(path, nil, lineWidth - thickness / 2, thickness / 2)
        return path
    }
    
    var sidePath: CGPath {
        let path = CGPathCreateMutable()
        CGPathMoveToPoint(path, nil, 0, self.bounds.height / 2)
        CGPathAddLineToPoint(path, nil, self.bounds.width, self.bounds.height/2)
        return path
    }
    
    opened by raheelsadiq 2
Owner
Toan Nguyen
Toan Nguyen
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
SwiftBar - Powerful macOS menu bar customization tool

SwiftBar - Powerful macOS menu bar customization tool

SwiftBar 2k Jan 8, 2023
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
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
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
This is a simple Mac Catalyst example showcasing how to build a dropdown menu toolbar button using AppKit.

CatalystToolbarMenuButton This is a simple Mac Catalyst example showcasing how to build a dropdown menu toolbar button using AppKit. There are ways to

Steven Troughton-Smith 24 Dec 8, 2022
SwiftySideMenu is a lightweight and easy to use side menu controller to add left menu and center view controllers with scale animation based on Pop framework.

SwiftySideMenu SwiftySideMenu is a lightweight, fully customizable, and easy to use controller to add left menu and center view controllers with scale

Hossam Ghareeb 84 Feb 4, 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