Git Product home page Git Product logo

mediummenu's Introduction

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" in info.plist as key. Eash value is "YES" and "NO".

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.

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๐Ÿˆ

mediummenu's People

Watchers

James Cloos avatar Eric Shorkey 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.