[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-7058":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":15,"stars7d":15,"stars30d":15,"stars90d":15,"forks30d":15,"starsTrendScore":15,"compositeScore":16,"rankGlobal":10,"rankLanguage":10,"license":17,"archived":18,"fork":18,"defaultBranch":19,"hasWiki":20,"hasPages":18,"topics":21,"createdAt":10,"pushedAt":10,"updatedAt":30,"readmeContent":31,"aiSummary":32,"trendingCount":15,"starSnapshotCount":15,"syncStatus":33,"lastSyncTime":34,"discoverSource":35},7058,"GuillotineMenu","Yalantis\u002FGuillotineMenu","Yalantis","Our Guillotine Menu Transitioning Animation implemented in Swift reminds a bit of a notorious killing machine.","https:\u002F\u002Fyalantis.com\u002F",null,"Swift",2888,250,111,0,59.2,"MIT License",false,"master",true,[22,23,24,25,26,27,28,29],"animation","cocoapods","guillotinemenu","ios","protocol","swift","transition-animation","yalantis","2026-06-12 04:00:32","# GuillotineMenu.swift \n\n[![pod version](https:\u002F\u002Fimg.shields.io\u002Fcocoapods\u002Fv\u002FGuillotineMenu.svg)](https:\u002F\u002Fimg.shields.io\u002Fcocoapods\u002Fv\u002FGuillotineMenu.svg)\n[![Platform](https:\u002F\u002Fimg.shields.io\u002Fcocoapods\u002Fp\u002FGuillotineMenu.svg?style=flat)](https:\u002F\u002Fgithub.com\u002FYalantis\u002FGuillotineMenu)\n[![Yalantis](https:\u002F\u002Fgithub.com\u002FYalantis\u002FGuillotineMenu\u002Fblob\u002Fmaster\u002Fbadge_dark.png)](https:\u002F\u002Fyalantis.com\u002F?utm_source=github)\n\n![Preview](https:\u002F\u002Fgithub.com\u002FYalantis\u002FGuillotineMenu\u002Fblob\u002Fmaster\u002Fexample.gif)\n\nInspired by [this project on Dribbble](https:\u002F\u002Fdribbble.com\u002Fshots\u002F2018249-Side-Topbar-Animation)\n\nAlso, read how it was done in our [blog](https:\u002F\u002Fyalantis.com\u002Fblog\u002Fhow-we-created-guillotine-menu-animation\u002F)\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:\u002F\u002Fcocoapods.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) -> UIViewControllerAnimatedTransitioning? {\n\tpresentationAnimator.mode = .presentation\n\treturn presentationAnimator\n}\n\nfunc animationControllerForDismissedController(dismissed: UIViewController) -> 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\u002For 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","GuillotineMenu 是一个用 Swift 实现的 iOS 菜单过渡动画库，灵感来源于 Dribbble 上的一个项目。其核心功能是提供一种独特的菜单展开和收起动画效果，模仿了断头台的动作，支持从屏幕左上角或导航栏处下拉菜单。该库通过协议来定义菜单的行为，并使用自定义的转场动画器来实现流畅的动画效果。适用于需要为 iOS 应用添加创意且引人注目的侧边菜单或顶部工具栏动画的应用场景中，尤其适合追求独特用户体验的设计者和开发者。项目采用 MIT 许可证发布，支持 CocoaPods 安装方式，易于集成到现有项目中。",2,"2026-06-11 03:10:21","top_language"]