{"id":15030229,"url":"https://github.com/younatics/yndropdownmenu","last_synced_at":"2025-05-16T06:07:55.758Z","repository":{"id":49847039,"uuid":"82458708","full_name":"younatics/YNDropDownMenu","owner":"younatics","description":"✨ Awesome Dropdown menu for iOS with Swift 5.0","archived":false,"fork":false,"pushed_at":"2019-03-31T08:18:35.000Z","size":13687,"stargazers_count":1349,"open_issues_count":8,"forks_count":113,"subscribers_count":33,"default_branch":"master","last_synced_at":"2025-05-16T06:07:45.645Z","etag":null,"topics":["carthage","cocoapods","dropdown","dropdown-menus","dropdownmenu","ios","menu","menubar","swift","swift5"],"latest_commit_sha":null,"homepage":"https://www.cocoacontrols.com/controls/yndropdownmenu","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/younatics.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-02-19T12:53:02.000Z","updated_at":"2025-04-23T23:47:06.000Z","dependencies_parsed_at":"2022-09-19T03:11:20.762Z","dependency_job_id":null,"html_url":"https://github.com/younatics/YNDropDownMenu","commit_stats":null,"previous_names":[],"tags_count":40,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/younatics%2FYNDropDownMenu","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/younatics%2FYNDropDownMenu/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/younatics%2FYNDropDownMenu/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/younatics%2FYNDropDownMenu/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/younatics","download_url":"https://codeload.github.com/younatics/YNDropDownMenu/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254478193,"owners_count":22077676,"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":["carthage","cocoapods","dropdown","dropdown-menus","dropdownmenu","ios","menu","menubar","swift","swift5"],"created_at":"2024-09-24T20:12:48.910Z","updated_at":"2025-05-16T06:07:50.689Z","avatar_url":"https://github.com/younatics.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# YNDropDownMenu\n\n[![Awesome](https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg)](https://github.com/sindresorhus/awesome)\n[![Version](https://img.shields.io/cocoapods/v/YNDropDownMenu.svg?style=flat)](http://cocoapods.org/pods/YNDropDownMenu)\n[![Carthage Compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)\n[![Docs](https://github.com/younatics/YNDropDownMenu/blob/master/docs/badge.svg)](https://younatics.github.io/YNDropDownMenu/)\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg?style=flat)](https://github.com/younatics/YNDropDownMenu/blob/master/LICENSE)\n[![Build Status](https://travis-ci.org/younatics/YNDropDownMenu.svg?branch=master)](https://travis-ci.org/younatics/YNDropDownMenu)\n[![Platform](https://img.shields.io/cocoapods/p/YNDropDownMenu.svg?style=flat)](http://cocoapods.org/pods/YNDropDownMenu)\n[![Swift 5.0](https://img.shields.io/badge/Swift-5.0-orange.svg?style=flat)](https://developer.apple.com/swift/)\n\n## Updates\nSee [CHANGELOG](https://github.com/younatics/YNDropDownMenu/blob/master/CHANGELOG.md) for details\n\n## Introduction\nThe eligible dropdown menu for iOS, written in Swift 5, appears dropdown menu to display a view of related items when a user click on the dropdown menu. You can customize dropdown view whatever you like (e.g. UITableView, UICollectionView... etc)\n\n![demo](https://github.com/younatics/YNDropDownMenu/blob/master/Images/YNDropDownMenu.gif?raw=true)\n![demo2](https://github.com/younatics/YNDropDownMenu/blob/master/Images/YNDropDownMenu2.gif?raw=true)\n\n## Requirements\n\n`YNDropDownMenu` written in Swift 5. Compatible with iOS 8.0+\n\n## Installation\n\n### Cocoapods\n\nYNDropDownMenu is available through [CocoaPods](http://cocoapods.org). To install\nit, simply add the following line to your Podfile:\n\n```ruby\npod 'YNDropDownMenu'\n```\n### Carthage\n```\ngithub \"younatics/YNDropDownMenu\"\n```\n## Usage\n```swift\nimport YNDropDownMenu\n```\n\nInit view with frame`[CGRect]`, Views`[UIView]` and Titles`[String]`\n```swift\nlet view = YNDropDownMenu(frame:frame, dropDownViews: dropDownViews, dropDownViewTitles: [\"Apple\", \"Banana\", \"Kiwi\", \"Pear\"])\nself.addSubview(view)\n```\ndone!\n\n### Inherit YNDropDownView (If you need)\n```swift\nclass DropDownView: YNDropDownView {\n   // override method to call open \u0026 close\n    override func dropDownViewOpened() {\n        print(\"dropDownViewOpened\")\n    }\n    \n    override func dropDownViewClosed() {\n        print(\"dropDownViewClosed\")\n    }\n\n    // Hide Menu\n    self.hideMenu()\n\n    // Change Menu Title At Index\n    self.changeMenu(title: \"Changed\", at: 1)\n    self.changeMenu(title: \"Changed\", status: .selected, at: 1)\n\n    // Change View At Index \n    self.changeView(view: UIView(), at: 3)\n\n    // Always Selected Menu\n    self.alwaysSelected(at: 0)\n    self.normalSelected(at: 0)\n}\n```\n\n### Customize\n\nShow \u0026 Hide Menu \n```swift\nview.showAndHideMenu(at:1)\n\n// When view is already opened\nview.hideMenu()\n```\n\nDisable \u0026 Enable Menu \n```swift\nview.disabledMenu(at: 2)\nview.enabledMenu(at: 3)\n```\n\nAlways/Normal selected button label\n```swift\nview.alwaysSelected(at: 0)\nview.normalSelected(at: 0)\n```\n\nButton Images with 3 situations (normal, selected, disabled)\n```swift\nview.setStatesImages(normalImages: [UIImage(named: \"arrow_nor\")], selectedImages: [UIImage(named: \"arrow_sel\")], disabledImages: [UIImage(named: \"arrow_dim\")])\n```\n\nLabel color with 3 situations\n```swift\nview.setLabelColorWhen(normal: UIColor.black, selected: UIColor.blue, disabled: UIColor.gray)\n```\n\nLabel font with 3 situations\n```swift\nview.setLabelFontWhen(normal: UIFont.systemFont(ofSize: 12), selected: UIFont.boldSystemFont(ofSize: 12), disabled: UIFont.systemFont(ofSize: 12))\n```\n\nBlurEffectView\n```swift\n// Enadbled or Disabled first (Default true)\nview.backgroundBlurEnabled = false\n\n// Use this line if you want to change UIBlurEffectStyle\nview.blurEffectStyle = .light\n\n// Or customize blurEffectView(UIView)\nlet backgroundView = UIView()\nbackgroundView.backgroundColor = UIColor.black\nview.blurEffectView = backgroundView\n\n// Animation end alpha\nview.blurEffectViewAlpha = 0.7\n```\n\nAnimation duration\n```swift\nview.showMenuDuration = 0.5\nview.hideMenuDuration = 0.3\n```\n\nAnimation velocity, damping\n```swift\nview.showMenuSpringVelocity = 0.5\nview.showMenuSpringWithDamping = 0.8\n\nview.hideMenuSpringVelocity = 0.9\nview.hideMenuSpringWithDamping = 0.8\n```\n\nChange Menu Title At Index\n```swift\nview.changeMenu(title: \"Changed\", at: 1)\nview.changeMenu(title: \"Changed\", status: .selected, at: 1)\n\n```\n\nChange View At Index \n```swift\nview.changeView(view: UIView(), at: 3)\n```\n\nChange Bottom Line\n```swift\nview.bottomLine.backgroundColor = UIColor.black\nview.bottomLine.isHidden = false\n```\n\n\n### Deprecated\n```swift\nextension YNDropDownMenu {\n    @available(*, deprecated, message: \"use init(frame: CGRect, dropDownViews: [UIView], dropDownViewTitles: [String]) instead\")\n    public init(frame: CGRect, YNDropDownViews: [YNDropDownView], dropDownViewTitles: [String])\n\n    @available(*, deprecated, message: \"use alwaysSelected(at index: Int) instead\")\n    open func alwaysSelectedAt(index: Int) {\n        self.alwaysSelected(at: index)\n    }\n    \n    @available(*, deprecated, message: \"use disabledMenu(at index: Int) instead\")\n    open func disabledMenuAt(index: Int) {\n        self.disabledMenu(at: index)\n    }\n    \n    @available(*, deprecated, message: \"use enabledMenu(at index: Int) instead\")\n    open func enabledMenuAt(index: Int) {\n        self.enabledMenu(at: index)\n    }\n\n    @available(*, deprecated, message: \"use showAndHideMenu(at index: Int) instead\")\n    open func showAndHideMenuAt(index: Int) {\n        self.showAndHideMenu(at: index)\n    }\n}\n\nextension YNDropDownView {\n    @available(*, deprecated, message: \"use changeMenu(title: String, at index: Int) instead\")\n    open func changeMenuTitleAt(index: Int, title: String) {\n        self.delegate?.changeMenu(title: title, at: index)\n    }\n}\n```\n## References\n#### Please tell me or make pull request if you use this library in your application :) \n#### [@zigbang](https://github.com/zigbang)\n#### [MotionBook](https://github.com/younatics/MotionBook)\n\n## Author\n[younatics](https://twitter.com/younatics)\n\u003ca href=\"http://twitter.com/younatics\" target=\"_blank\"\u003e\u003cimg alt=\"Twitter\" src=\"https://img.shields.io/twitter/follow/younatics.svg?style=social\u0026label=Follow\"\u003e\u003c/a\u003e\n\n## Thanks to\n[jegumhon](https://github.com/jegumhon)\n\n## License\nYNDropDownMenu is available under the MIT license. See the LICENSE file for more info.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyounatics%2Fyndropdownmenu","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyounatics%2Fyndropdownmenu","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyounatics%2Fyndropdownmenu/lists"}