Coder Social home page Coder Social logo

yippeeapp / guillotinemenu Goto Github PK

View Code? Open in Web Editor NEW

This project forked from yalantis/guillotinemenu

0.0 3.0 0.0 436 KB

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

Home Page: http://yalantis.com/

License: MIT License

Ruby 2.85% Swift 97.15%

guillotinemenu's Introduction

GuillotineMenu.swift

Preview

Guillotine Menu

Made in Yalantis.

Inspired by this project on Dribbble

Also, read how it was done in our blog

Requirements

iOS 8.0

Installation

####CocoaPods Coming soon.

####Manual Installation

You are welcome to see the sample of the project for fully operating sample in the Example folder.

  • Add the folder "GuillotineMenu" to your project.
  • Create a view controller in the interface builder and set it's class to be GuillotineMenuViewController or it's subclass.
  • Set the connetion from your view controller to the GuillotineMenuViewController with GuillotineMenuSegue
  • Call destinationVC.setMenuButtonWithImage(<#UIImage>) in prepareForSegue method if it is GuillotineMenuSegue
@objc protocol GuillotineAnimationProtocol: NSObjectProtocol {
   func navigationBarHeight() -> CGFloat
   func anchorPoint() -> CGPoint
   func hostTitle () -> NSString
}
  • You need to set the properties for the GuillotineMenuViewController as shown in the sample below:
override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
   let destinationVC = segue.destinationViewController as! GuillotineMenuViewController
   destinationVC.hostNavigationBarHeight = self.navigationController!.navigationBar.frame.size.height
   destinationVC.hostTitleText = self.navigationItem.title
   destinationVC.view.backgroundColor = self.navigationController!.navigationBar.barTintColor
   destinationVC.setMenuButtonWithImage(barButton.imageView!.image!)
}
  • The image rotation will be done for you, just pass the image for the menu button.

Customisation

You are welcome to set any background color for the GuillotineMenuViewController's view but it is recommended to use the same color you use for the navigation bar. Also the menu bar button is recommended to be set the way it is set in the sample project.

The menu look customization is limited with your imagination only. Feel free to give it any look you want in the interface builder or programmatically.

Compatibility

iOS 8

Version: 1.0

License

The MIT License (MIT)

Copyright (c) 2015 Yalantis

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.

guillotinemenu's People

Contributors

makstheawesome avatar

Watchers

Chew Chit Siang avatar James Cloos avatar  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.