{"id":2606,"url":"https://github.com/Yalantis/GuillotineMenu","last_synced_at":"2025-08-06T16:31:21.303Z","repository":{"id":30367021,"uuid":"33919573","full_name":"Yalantis/GuillotineMenu","owner":"Yalantis","description":"Our Guillotine Menu Transitioning Animation implemented in Swift reminds a bit of a notorious killing machine.","archived":false,"fork":false,"pushed_at":"2020-04-13T12:49:18.000Z","size":987,"stargazers_count":2909,"open_issues_count":0,"forks_count":254,"subscribers_count":117,"default_branch":"master","last_synced_at":"2024-12-06T08:03:18.709Z","etag":null,"topics":["animation","cocoapods","guillotinemenu","ios","protocol","swift","transition-animation","yalantis"],"latest_commit_sha":null,"homepage":"https://yalantis.com/","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Yalantis.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/contributing.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-04-14T08:20:37.000Z","updated_at":"2024-11-15T06:15:33.000Z","dependencies_parsed_at":"2022-08-07T15:15:18.169Z","dependency_job_id":null,"html_url":"https://github.com/Yalantis/GuillotineMenu","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yalantis%2FGuillotineMenu","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yalantis%2FGuillotineMenu/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yalantis%2FGuillotineMenu/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yalantis%2FGuillotineMenu/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Yalantis","download_url":"https://codeload.github.com/Yalantis/GuillotineMenu/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228923694,"owners_count":17992567,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["animation","cocoapods","guillotinemenu","ios","protocol","swift","transition-animation","yalantis"],"created_at":"2024-01-05T20:16:18.171Z","updated_at":"2024-12-09T16:31:02.804Z","avatar_url":"https://github.com/Yalantis.png","language":"Swift","funding_links":[],"categories":["UI","Libs","Menu","Swift","HarmonyOS","Content","UI [🔝](#readme)","ALL"],"sub_categories":["Menu","UI","Windows Manager","Layout","Other free courses"],"readme":"# GuillotineMenu.swift \n\n[![pod version](https://img.shields.io/cocoapods/v/GuillotineMenu.svg)](https://img.shields.io/cocoapods/v/GuillotineMenu.svg)\n[![Platform](https://img.shields.io/cocoapods/p/GuillotineMenu.svg?style=flat)](https://github.com/Yalantis/GuillotineMenu)\n[![Yalantis](https://github.com/Yalantis/GuillotineMenu/blob/master/badge_dark.png)](https://yalantis.com/?utm_source=github)\n\n![Preview](https://github.com/Yalantis/GuillotineMenu/blob/master/example.gif)\n\nInspired by [this project on Dribbble](https://dribbble.com/shots/2018249-Side-Topbar-Animation)\n\nAlso, read how it was done in our [blog](https://yalantis.com/blog/how-we-created-guillotine-menu-animation/)\n\n\n## Requirements\n\n- iOS 8.0+\n- Xcode 10\n- Swift 5.0 (v 4.1+)\n- Swift 4.2 (v 4.0)\n\n## Installation\n\n#### [CocoaPods](http://cocoapods.org)\n\n```ruby\npod 'GuillotineMenu'\n```\n\n#### Manual Installation\n\nYou are welcome to see the sample of the project for fully operating sample in the Example folder.\n\n* You must add \"GuillotineMenuTransitionAnimation.swift\" to your project, that's all.\n\n### Usage\n\n* 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.\n* 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.\n* 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:\n\n```swift\nlet menuViewController = storyboard!.instantiateViewController(withIdentifier: \"MenuViewController\")\nmenuViewController.modalPresentationStyle = .custom\nmenuViewController.transitioningDelegate = self\n```\n\n* Implement UIViewControllerTransitionDelegate methods in your presenting view controller:\n\n```swift\nextension ViewController: UIViewControllerTransitioningDelegate {\n\nfunc animationControllerForPresentedController(presented: UIViewController, presentingController presenting: UIViewController, sourceController source: UIViewController) -\u003e UIViewControllerAnimatedTransitioning? {\n\tpresentationAnimator.mode = .presentation\n\treturn presentationAnimator\n}\n\nfunc animationControllerForDismissedController(dismissed: UIViewController) -\u003e UIViewControllerAnimatedTransitioning? {\n\tpresentationAnimator.mode = .dismissal\n\treturn presentationAnimator\n}\n```\n\n* At last, you can assign offset view, from where your menu will be dropped and button for it, and present your menu: \n\n```swift\npresentationAnimator.supportView = navigationController!.navigationBar\npresentationAnimator.presentButton = sender\npresent(menuViewController, animated: true, completion: nil)\n```\n\n### Customisation\n\nOf 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.\n\nTo specify the length of an animation effect, change the value of the \"duration\" property.\n\nAlso, you have wonderful delegate methods of animator:\n\n```swift\npublic protocol GuillotineAnimationDelegate: class {\n\t\n    func animatorDidFinishPresentation(_ animator: GuillotineTransitionAnimation)\n    func animatorDidFinishDismissal(_ animator: GuillotineTransitionAnimation)\n    func animatorWillStartPresentation(_ animator: GuillotineTransitionAnimation)\n    func animatorWillStartDismissal(_ animator: GuillotineTransitionAnimation)\n}\n```\nYou can do whatever you want alongside menu is animating.\n\n### Let us know!\n\nWe’d be really happy if you sent us links to your projects where you use our component. Just send an email to github@yalantis.com And do let us know if you have any questions or suggestion regarding the animation. \n\nP.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!\n\n\n### License\n\n\tThe MIT License (MIT)\n\n\tCopyright © 2017 Yalantis\n\n\tPermission is hereby granted, free of charge, to any person obtaining a copy\n\tof this software and associated documentation files (the \"Software\"), to deal\n\tin the Software without restriction, including without limitation the rights\n\tto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n\tcopies of the Software, and to permit persons to whom the Software is\n\tfurnished to do so, subject to the following conditions:\n\n\tThe above copyright notice and this permission notice shall be included in all\n\tcopies or substantial portions of the Software.\n\n\tTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n\tIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n\tFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n\tAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n\tLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n\tOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n\tSOFTWARE.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FYalantis%2FGuillotineMenu","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FYalantis%2FGuillotineMenu","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FYalantis%2FGuillotineMenu/lists"}