Guillotinemenu

Our Guillotine Menu Transitioning Animation implemented in Swift reminds a bit of a notorious killing machine.
Alternatives To Guillotinemenu
Project NameStarsDownloadsRepos Using ThisPackages Using ThisMost Recent CommitTotal ReleasesLatest ReleaseOpen IssuesLicenseLanguage
Hamburgers6,897317774 months ago20March 15, 202233mitSCSS
Tasty CSS-animated Hamburgers
Boommenu5,761
a year ago117Java
A menu which can ... BOOM! - Android
Awesomemenu5,100
175 years ago2March 24, 201522otherObjective-C
Path 2.0 menu using CoreAnimation :)
Side Menu.android5,005
273 years ago1February 04, 201518apache-2.0Java
Side menu with some categories to choose.
React Burger Menu4,8629401416 months ago136January 01, 20237mitJavaScript
:hamburger: An off-canvas sidebar component with a collection of effects and styles using CSS transitions and SVG path animations
Context Menu.android3,740
1242 years ago8May 25, 20165apache-2.0Kotlin
You can easily add awesome animated context menu to your app.
Persei3,249
103 years ago8October 26, 20171mitSwift
Animated top menu for UITableView / UICollectionView / UIScrollView written in Swift
Circle Menu3,149
253 years ago25October 22, 20189mitSwift
:octocat: ⭕️ CircleMenu is a simple, elegant UI menu with a circular layout and material design animations. Swift UI library made by @Ramotion - https://www.ramotion.com/agency/app-development/
Androidviewhover3,1412915 years ago5May 23, 201519Java
An elegant way to show your menu or messages.
Guillotinemenu2,812
93 years ago6October 22, 2018mitSwift
Our Guillotine Menu Transitioning Animation implemented in Swift reminds a bit of a notorious killing machine.
Alternatives To Guillotinemenu
Select To Compare


Alternative Project Comparisons
Readme

GuillotineMenu.swift

pod version Platform Yalantis

Preview

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+)
  • Swift 4.2 (v 4.0)

Installation

CocoaPods

pod 'GuillotineMenu'

Manual Installation

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

  • You must add "GuillotineMenuTransitionAnimation.swift" to your project, that's all.

Usage

  • Now, it's for you to decide, should or not your menu drop from top left corner of the screen or from your navigation bar, because if you want animation like in example, you must make your menu view controller confirm to "GuillotineMenu" protocol. When you confirm to this protocol, you must make a menu button and title, you don't need to make frame for them, because animator will make it itself.
  • In view controller, that will present your menu, you must make a property for "GuillotineMenuTransitionAnimator". It's necessary for proper animation when you show or dismiss menu.
  • When you present menu, you must ensure, that model presentation style set to Custom and menu's transition delegate set to view controller, that presents menu:
let menuViewController = storyboard!.instantiateViewController(withIdentifier: "MenuViewController")
menuViewController.modalPresentationStyle = .custom
menuViewController.transitioningDelegate = self
  • Implement UIViewControllerTransitionDelegate methods in your presenting view controller:
extension ViewController: UIViewControllerTransitioningDelegate {

func animationControllerForPresentedController(presented: UIViewController, presentingController presenting: UIViewController, sourceController source: UIViewController) -> UIViewControllerAnimatedTransitioning? {
	presentationAnimator.mode = .presentation
	return presentationAnimator
}

func animationControllerForDismissedController(dismissed: UIViewController) -> UIViewControllerAnimatedTransitioning? {
	presentationAnimator.mode = .dismissal
	return presentationAnimator
}
  • At last, you can assign offset view, from where your menu will be dropped and button for it, and present your menu:
presentationAnimator.supportView = navigationController!.navigationBar
presentationAnimator.presentButton = sender
present(menuViewController, animated: true, completion: nil)

Customisation

Of course, you can assign different "supportView" or "presentButton" for menu, but we think that's the best case would be behaviour like in Example project.

To specify the length of an animation effect, change the value of the "duration" property.

Also, you have wonderful delegate methods of animator:

public protocol GuillotineAnimationDelegate: class {
	
    func animatorDidFinishPresentation(_ animator: GuillotineTransitionAnimation)
    func animatorDidFinishDismissal(_ animator: GuillotineTransitionAnimation)
    func animatorWillStartPresentation(_ animator: GuillotineTransitionAnimation)
    func animatorWillStartDismissal(_ animator: GuillotineTransitionAnimation)
}

You can do whatever you want alongside menu is animating.

Let us know!

We’d be really happy if you sent us links to your projects where you use our component. Just send an email to [email protected] And do let us know if you have any questions or suggestion regarding the animation.

P.S. We’re going to publish more awesomeness wrapped in code and a tutorial on how to make UI for iOS (Android) better than better. Stay tuned!

License

The MIT License (MIT)

Copyright © 2017 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.
Popular Animation Projects
Popular Menu Projects
Popular User Interface Categories
Related Searches

Get A Weekly Email With Trending Projects For These Categories
No Spam. Unsubscribe easily at any time.
Swift
Animation
Menu
Animator
Transition Animation
Yalantis