A menu based on Medium iOS app.

Related tags

Menu MediumMenu
Overview

Notice: MediumMenu is no longer being maintained/updated.

MediumMenu

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

Inspired by RBMenu. I made that a reference and customized a fine point.

Demo

MediumMenu

Installation

CocoaPods

The easiest way to get started is to use CocoaPods. Add the following line to your Podfile:

platform :ios, '8.0'
use_frameworks!
# The following is a Library of Swift.
pod 'MediumMenu'

Then, run the following command:

pod install

Carthage

Carthage is a decentralized dependency manager that automates the process of adding frameworks to your Cocoa application.

You can install Carthage with Homebrew using the following command:

$ brew update
$ brew install carthage

To integrate MediumMenu into your Xcode project using Carthage, specify it in your Cartfile:

github "pixyzehn/MediumMenu"

Run carthage update.

$ carthage update

Other

Add the MediumMenu (including MediumMenu.swift) folder into your project.


Due to the lack of choice whether status bar is hidden or not, Edit info.plist in your project.

Add "Status bar is initially hidden" and "View controller-based status bar appearance" keys to your info.plist. Set the values to "YES" and "NO" respectively.

You can set the following property. If you don't set the these property, default value is used.

let menu = MediumMenu(items: [item1, item2, item3, item4, item5], forViewController: self)
menu.textColor = UIColor.purpleColor()                        // Default is UIColor(red:0.98, green:0.98, blue:0.98, alpha:1).
menu.highLightTextColor = UIColor.redColor()                  // Default is UIColor(red:0.57, green:0.57, blue:0.57, alpha:1).
menu.backgroundColor = UIColor.yellowColor()                  // Default is UIColor(red:0.05, green:0.05, blue:0.05, alpha:1).
menu.titleFont = UIFont(name: "AvenirNext-Regular", size: 30) // Default is UIFont(name: "HelveticaNeue-Light", size: 28).
menu.titleAlignment = .Center                                 // Default is .Left.
menu.height = 370                                             // Default is 466.
menu.bounceOffset = 10                                        // Default is 0.
menu.velocityTreshold = 700                                   // Default is 1000.
menu.panGestureEnable = false                                 // Default is true.
menu.highLighedIndex = 3                                      // Default is 1.
menu.heightForRowAtIndexPath = 40                             // Default is 57.
menu.heightForHeaderInSection = 0                             // Default is 30.
menu.enabled = false                                          // Default is true.
menu.animationDuration = 0.33                                 // Default is 0.2.

In the rest of the details, refer to MediumMenu-Sample project.

Description

MediumMenu is really similar to menu of real Medium for iOS.

Licence

MIT

Author

pixyzehn 🐈

Comments
  • Not working in landscape mode

    Not working in landscape mode

    First of all, thanks for creating MediumMenu! I really like the look and functionality.

    I have the menu working well in portrait mode, but when I turn the phone to landscape, the application no longer expands to fill the screen.

    Any tips on getting this to work in landscape?

    Thanks!

    opened by justinthiele 8
  • Fails to work unless it is initial view controller

    Fails to work unless it is initial view controller

    Tried using this library in a project where this nav controller takes over after a segue from another UIViewController. The menu still slides down as expected, but none of the menu items are clickable.

    opened by eshork 7
  • User interaction enabled on main view

    User interaction enabled on main view

    Hello. Whenever I tap on the main view (the one that slides down when the menu comes out), it messes up the constraints on that view. Is there a way to fix this, or have user interaction be disabled on that view when the menu is out?

    opened by DanielSmith1239 7
  • Push/ShowViewController breaks application

    Push/ShowViewController breaks application

    Hello! I really like your Medium Menu. I'm an iOS developer at Yelp and would love to use it in one of my personal projects. Unfortunately, currently pushing new view controllers onto the navigation controller's stack breaks everything currently. Any chance we could fix this?

    screen shot 2015-04-08 at 12 37 46 am

    opened by AttilaTheFun 4
  • Change highlighted menu item via function

    Change highlighted menu item via function

    Hey there!

    Thanks for sharing this. Just wondering if there if you have any function that can update the highlighted menu item from another viewcontroller - for example if you navigate to a viewcontroller via the menu, and then return via a segue, the menu will now show the wrong highlighted item.

    If not, I'll try and write something up.

    Thanks in advance.

    opened by edcousins 4
  • Presenting UIViewController

    Presenting UIViewController

    When trying to present a UIViewController from the HomeViewController in the example I get the following error: "Presenting view controllers on detached view controllers is discouraged."

    How are you presenting modal view controllers?

    opened by ghost 3
  • Landscape mode not filled with color

    Landscape mode not filled with color

    White Background https://gyazo.com/2369a4adc84390dc33198f2893f4b161

    Black Background https://gyazo.com/528e2317cadc7650c5fd191f614b467c

    What I noticed while testing this framework was that, if the app was ever in landscape mode the tableview would show the black background, so I went to original and saw the same issue in the demo project also; in terms of the two backgrounds not blending together, do you know of a fix for it?

    override public init(frame: CGRect) {
        super.init(frame: frame)
        self.titleFont           = UIFont(name: "HelveticaNeue-Light", size: 28)
        self.titleAlignment      = .Left
        self.height              = 400 // updated to good-fit height for iPhone 4s
        self.textColor           = Color.mediumBlackColor
        self.highlightTextColor  = Color.mediumGlayColor
        self.menuBackgroundColor = Color.mediumWhiteColor
        self.bounceOffset        = 0
        self.velocityTreshold    = 1000
        self.panGestureEnable    = true
        self.highlighedIndex     = 1
    }
    
    opened by trujamal 2
  • Add navigation item to single view controller

    Add navigation item to single view controller

    I'm trying to add a right navigation item to just one view controller, but when i override viewdidload in the view controller, the left navigation item is removed. Is there another way to approach this?

    opened by ghost 1
  • Add support for multilines cells

    Add support for multilines cells

    Konnichiwa Hiroki,

    Hontoni Arigato Gosaimasu for this cool menu!

    I would like to have multilines support for this menu so I added it with this pull request.

    opened by Aymenworks 1
  • adds contentController as root and inserts menu subview behind it

    adds contentController as root and inserts menu subview behind it

    This fixes 2 issues.

    1. When launching any modal I was getting a warning "Warning :-Presenting view controllers on detached view controllers is discouraged".
    2. UI issue with pop behavior with the navigation controller. If you pushed to another view and then pop back to it, the navigation bar was animating but the view itself was not.

    Both of these issues are resolved with this PR.

    opened by johnrufusj 1
  • Added a new property to control the bounce pan offset & fixed pan gesture handling

    Added a new property to control the bounce pan offset & fixed pan gesture handling

    Hi, I've fixed some things:

    • Added a new property to control the bounce pan offset
    • Fixed pan gesture issue when try to open the menu with custom height

    Thanks, Matteo

    opened by taglia3 1
  • Fails to work if logout and then back in

    Fails to work if logout and then back in

    I checked it out also and it seems that the problem is that if you "logout" and set your initial viewcontroller to your welcome view and "log in" again. It keeps the previous menu underneath. If you "Log back in" then even the selected index is the last one.

    I am using this to instantiate(log out) the "WelcomeViewController" and I think that is the problem.

    let storyboard = UIStoryboard(name: "Landing", bundle: nil)
            
     let controller = storyboard.instantiateViewController(withIdentifier: "WelcomeViewController")
            
            
     let appDelegate = UIApplication.shared.delegate as! AppDelegate
            
     appDelegate.window?.rootViewController = controller
    

    And that is how I "log in":

    let storyboard = UIStoryboard(name: "Main", bundle: nil)
                        
    let controller = storyboard.instantiateViewController(withIdentifier: "NavigationController")
    
    let appDelegate = UIApplication.shared.delegate as! AppDelegate
                        
     self.dismiss(animated: false, completion: { 
               appDelegate.window?.rootViewController = controller
     })
    

    You can check out the following images:

    1. This is in normal phase
    normal1
    1. This is after logout and back login
    bad
    opened by MaeseppTarvo 0
  • Background color can't be reset

    Background color can't be reset

    As the title says. Once the color has been set once, it can't be changed anymore, no matter how many times I call .backgroundColor.

    This blocks usage in an app that supports theming.

    Thanks!

    opened by alexbartisro 0
  • Can't Sign Out

    Can't Sign Out

    I have a set up as such.

    View Controller (Sign In) - > NavigationController (Medium Menu) - > Rest of app

    Adding a sign out item and dismissing the navigation controller through dismiss or poptoroot does not work.

    opened by Huddie 0
  • issue: remove from navigationcontroller

    issue: remove from navigationcontroller

    Hi,

    I have a navigation controller and added the menu to it. The menu item views are loose view controllers. The HomeViewcontroller has a segue to another view (imageviewcontroller). Now the (rather small) problem is that later on in the imageviewcontroller the menu item is not there (I don't want it to), the pan gesture from top to bottom still shows the menu.

    Any idea how I can remove the menu on the imageviewcontroller?

    Thanks in advance,

    Thomas

    opened by thomascsorbamedia 0
  • Changing subview before closing menu

    Changing subview before closing menu

    I don't know if it's supposed to work like this, but the menu closes without changing the subview. Is it possible for it to change the subview with open menu so that the menu closing reveals the new subview?

    opened by sp0rk 0
Releases(1.2.0)
Owner
Hiroki Nagasawa
Hiroki Nagasawa
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
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
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
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
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
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

Exyte 716 Dec 5, 2022
A swift library based on the various options menu in material design in Android

KTOptionMenu Description KTOptionMenu is a swift library based on the various options menu in material design in Android that allows you to easily cre

null 1 Jul 21, 2022
Context menu similar to the one in the Pinterest iOS app

VLDContextSheet A clone of the Pinterest iOS app context menu. Example Usage VLDContextSheetItem *item1 = [[VLDContextSheetItem alloc] initWithTitle:

Vladimir Angelov 173 Mar 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
An iOS App dev menu always on top window

An iOS App dev menu always on top window

Frank Lu 1 Nov 12, 2021
A menu bar app to change input source swiftly using shortcuts on macOS Big Sur or later.

Source Switcher A menu bar app to change input sources swiftly using shortcuts on macOS Big Sur and later. View screenshots Introduction This app uses

null 34 Nov 9, 2022
macOS (>11.0) Menu Bar App for WLED

wledQuickControl functions Left click on the Menubar icon will toggle the WLED device On/Off Right click on the Menubar icon: will update the icon/sli

satrik 15 Nov 8, 2022
PopMenu is pop animation menu inspired by Sina weibo / NetEase app.

PopMenu PopMenu is pop animation menu inspired by Sina weibo / NetEase app. Screenshots Installation CocoaPods With CocoaPods, add this line to your P

曾宪华 898 Nov 14, 2022
You can easily add awesome animated context menu to your app.

Context-Menu.iOS You can easily add awesome animated context menu to your app. Made in Check this [project on dribbble] (https://dribbble.com/shots/17

Yalantis 1.8k Nov 17, 2022
adb-tools-mac is a macOS menu bar app written in SwiftUI for common adb tools.

adb-tools-mac is a macOS menu bar app written in SwiftUI for common adb tools.

Naman Dwivedi 930 Jan 2, 2023
Ambar is a macOS Menu Bar app built with SwiftUI.

Ambar Ambar is a macOS Menu Bar app built with SwiftUI. It is a template project which means that it can be used as a starting point for a new Menu Ba

null 16 Nov 14, 2022
macOS menu bar app that displays the current status of SIP (System Integrity Protection)

MenuBarSIPDetector This is a DEMO app for my Swift library TINURecovery and it is a macOS menu bar app that displays the current status of SIP (System

null 19 Dec 18, 2022
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