[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-7091":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":16,"subscribersCount":16,"size":16,"stars1d":16,"stars7d":16,"stars30d":16,"stars90d":16,"forks30d":16,"starsTrendScore":16,"compositeScore":17,"rankGlobal":10,"rankLanguage":10,"license":18,"archived":19,"fork":19,"defaultBranch":20,"hasWiki":21,"hasPages":19,"topics":22,"createdAt":10,"pushedAt":10,"updatedAt":27,"readmeContent":28,"aiSummary":29,"trendingCount":16,"starSnapshotCount":16,"syncStatus":30,"lastSyncTime":31,"discoverSource":32},7091,"BTNavigationDropdownMenu","PhamBaTho\u002FBTNavigationDropdownMenu","PhamBaTho","The elegant yet functional dropdown menu, written in Swift, appears underneath the navigation bar to display a list of defined items when a user clicks on the navigation title.","",null,"Swift",2667,408,58,49,0,59.84,"MIT License",false,"master",true,[23,24,25,26],"dropdown-menu","ios","navigation-title","swift","2026-06-12 04:00:32","![alt tag](https:\u002F\u002Fgithub.com\u002FPhamBaTho\u002FBTNavigationDropdownMenu\u002Fblob\u002Fmaster\u002FAssets\u002FBTNavigationDropdownLogo.png)\n\n[![Pod Version](https:\u002F\u002Fimg.shields.io\u002Fcocoapods\u002Fv\u002FBTNavigationDropdownMenu.svg?style=flat)](http:\u002F\u002Fcocoadocs.org\u002Fdocsets\u002FBTNavigationDropdownMenu\u002F)\n[![License: MIT](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Flicense-MIT-blue.svg?style=flat)](https:\u002F\u002Fgithub.com\u002FPhamBaTho\u002FBTNavigationDropdownMenu\u002Fblob\u002Fmaster\u002FLICENSE)\n![Language](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Flanguage-Swift-brightgreen.svg?style=flat)\n\u003C!--[![Build Status](https:\u002F\u002Ftravis-ci.org\u002FPhamBaTho\u002FBTNavigationDropdownMenu.svg?branch=master)](https:\u002F\u002Ftravis-ci.org\u002FPhamBaTho\u002FBTNavigationDropdownMenu)-->\n\n## Introduction\nThe elegant yet functional dropdown menu, written in Swift, appears underneath the navigation bar to display a list of defined items when a user clicks on the navigation title.\n\n![alt tag](https:\u002F\u002Fgithub.com\u002FPhamBaTho\u002FBTNavigationDropdownMenu\u002Fblob\u002Fmaster\u002FAssets\u002FDemo.gif)\n\n## Installation\n### CocoaPods\n**BTNavigationDropdownMenu** is available through [CocoaPods](http:\u002F\u002Fcocoapods.org). To install it, simply add the following line to your Podfile:\n\n```ruby\nuse_frameworks!\npod 'BTNavigationDropdownMenu'\n```\nGo ahead and **import** BTNavigationDropdownMenu into your own Swift files \n```swift\nimport BTNavigationDropdownMenu\n```\n\n## Carthage\n[Carthage](https:\u002F\u002Fgithub.com\u002FCarthage\u002FCarthage) is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks.\n\nYou can install Carthage with [Homebrew](https:\u002F\u002Fbrew.sh\u002F) using the following command:\n\n```bash\n$ brew update\n$ brew install carthage\n```\n\nTo integrate BTNavigationDropdownMenu into your Xcode project using Carthage, specify it in your `Cartfile`:\n\n```ogdl\ngithub \"PhamBaTho\u002FBTNavigationDropdownMenu\" ~> 0.7\n```\n\nRun `carthage update` to build the framework and drag the built `BTNavigationDropdownMenu.framework` into your Xcode project.\n\n## Usage\n### Instantiate\nStart by creating an Array that contains strings as **elements of a dropdown list**:\n```swift\nlet items = [\"Most Popular\", \"Latest\", \"Trending\", \"Nearest\", \"Top Picks\"]\n```\nCreate a **new instance** of BTNavigationDropdownMenu:\n```swift\nlet menuView = BTNavigationDropdownMenu(navigationController: self.navigationController, containerView: self.navigationController!.view, title: BTTitle.title(\"Dropdown Menu\"), items: items)\n```\nor like this:\n```swift\nlet menuView = BTNavigationDropdownMenu(title: BTTitle.index(1), items: items)\n```\n\nBTTitle is an enum. We can set `BTTitle.title(string)` or `BTTitle.index(Int)` (Note: `BTTitle.index` is the index of defined `items` array).\n\nBy default, `navigationController` is the topmost navigation controller and `containerView` is keyWindow. \n\n(`keyWindow` is recommended for `containerView` so that the black overlay can cover the whole screen. In some cases, `keyWindow` doesn't work properly, like using with side menu (e.g. SWRevealViewController), the dropdown menu doesn't move along with the parent view or navigation controller. To workaround this issue, you can use `self.navigationController!.view`.)\n\nSet **title of navigation bar** as menuView:\n```swift\nself.navigationItem.titleView = menuView\n```\nCall BTNavigationDropdownMenu closure to get **the index of selected cell**:\n```swift\nmenuView.didSelectItemAtIndexHandler = {[weak self] (indexPath: Int) -> () in\n            print(\"Did select item at index: \\(indexPath)\")\n            self.selectedCellLabel.text = items[indexPath]\n}\n```\n`menuView.show()` or `menuView.hide()` to show or hide dropdown menu manually.\n\n`menuView.toggle()` to toogle dropdown menu shown\u002Fhide.\n\n`menuView.isShown` (Boolean type) property to check showing state of dropdown menu.\n\n`menuView.updateItems(items: [AnyObject])` to update items in dropdown menu.\n\n### Customization\nFirst, assign the items and frame for the dropdown menu. Then, customize the look and feel of the menu by overriding these properties:\n\n| Name | Description | Default value |\n|---|---|:---:|\n| `navigationBarTitleFont` |  Navigation bar title font | System font, bold, size 17 |\n| `cellHeight` | Cell height | 50 |\n| `arrowImage` | Arrow next to the navigation title | Provided image |\n| `arrowPadding` | Padding between the navigation title and arrow | 15 |\n| `cellBackgroundColor` | Cell background color | UIColor.white |\n| `cellSeparatorColor` | Cell separator color | UIColor.darkGray |\n| `cellTextLabelColor` | Text color inside of the cell | UIColor.darkGray |\n| `cellTextLabelFont` | Text font inside the cell | System font, bold, size 17 |\n| `cellTextLabelAlignment` | Text alignment inside of the cell | NSTextAlignment.left |\n| `cellSelectionColor` | Selected color of the cell | UIColor.lightGray |\n| `checkMarkImage` | Checkmark icon for the cell | Provided image |\n| `animationDuration` | Animation duration for showing\u002Fhiding of the menu | 0.3 |\n| `maskBackgroundColor` | Mask layer color | UIColor.black |\n| `maskBackgroundOpacity` | Opacity of the mask layer | 0.3 |\n| `menuTitleColor` | Title color displayed in the menu | UIColor.lightGray |\n| `shouldKeepSelectedCellColor` | Selected cell color visibility when menu is shown | false |\n| `shouldChangeTitleText` | Ability to change the selected title text | true |\n| `selectedCellTextLabelColor` | Selected cell text label color | UIColor.darkGray |\n| `arrowTintColor` | Tint color of the arrow | UIColor.white |\n\n## Requirement\n- iOS 9.0+\n\n## Changelog\nSee the [CHANGELOG](https:\u002F\u002Fgithub.com\u002FPhamBaTho\u002FBTNavigationDropdownMenu\u002Fblob\u002Fmaster\u002FCHANGELOG.md) for details\n\n## License\nBTNavigationDropdownMenu is available under the MIT License. See the [LICENSE](https:\u002F\u002Fgithub.com\u002FPhamBaTho\u002FBTNavigationDropdownMenu\u002Fblob\u002Fmaster\u002FLICENSE) for details.\n","BTNavigationDropdownMenu 是一个用 Swift 编写的优雅且实用的下拉菜单库，当用户点击导航栏标题时，会在导航栏下方显示预定义的项目列表。其核心功能包括通过简单的配置即可实现自定义下拉菜单，并支持使用 CocoaPods 或 Carthage 进行集成。该库允许开发者轻松设置菜单项、标题样式（如文本或索引）以及容器视图，以适应不同的应用布局需求。适用于 iOS 应用中需要在导航栏添加交互式下拉菜单的各种场景，如筛选条件选择、排序方式切换等。",2,"2026-06-11 03:10:29","top_language"]