{"id":32151700,"url":"https://github.com/johankool/drawer","last_synced_at":"2025-10-21T10:50:55.929Z","repository":{"id":56916074,"uuid":"156933225","full_name":"johankool/Drawer","owner":"johankool","description":"A Maps like drawer for iOS.","archived":false,"fork":false,"pushed_at":"2021-11-04T12:19:38.000Z","size":65,"stargazers_count":9,"open_issues_count":0,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-10-21T10:50:36.678Z","etag":null,"topics":["cocoa","drawer","ios","iphone","maps","sheet","swift"],"latest_commit_sha":null,"homepage":"","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/johankool.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-11-10T00:34:29.000Z","updated_at":"2023-11-21T08:54:59.000Z","dependencies_parsed_at":"2022-08-21T03:50:28.780Z","dependency_job_id":null,"html_url":"https://github.com/johankool/Drawer","commit_stats":null,"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"purl":"pkg:github/johankool/Drawer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johankool%2FDrawer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johankool%2FDrawer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johankool%2FDrawer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johankool%2FDrawer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/johankool","download_url":"https://codeload.github.com/johankool/Drawer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johankool%2FDrawer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280248569,"owners_count":26297925,"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","status":"online","status_checked_at":"2025-10-21T02:00:06.614Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["cocoa","drawer","ios","iphone","maps","sheet","swift"],"created_at":"2025-10-21T10:50:50.527Z","updated_at":"2025-10-21T10:50:55.924Z","avatar_url":"https://github.com/johankool.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# JKDrawer\n\nA Maps like drawer for iOS.\n\nFeatures:\n\n- control drawer size\n- snap to preferred sizes\n- multiple stacked drawers\n- dragging and closing using gestures\n- handling nested scroll views\n- subtle animations\n- no need to subclass view controllers\n\n[![CocoaPods Compatible](https://img.shields.io/badge/CocoaPods-compatible-brightgreen?style=flat)](https://cocoapods.org/pods/JKDrawer)\n[![Carthage Compatible](https://img.shields.io/badge/Carthage-compatible-brightgreen?style=flat)](https://github.com/Carthage/Carthage)\n[![Swift Package Manager Compatible](https://img.shields.io/badge/Swift_Package_Manager-compatible-brightgreen?style=flat)](https://github.com/Carthage/Carthage)\n\n## Requirements\n\n- iOS 10.0+\n- Xcode 10.2+\n- Swift 4+\n\n## Installation\n\n### CocoaPods\n\n[CocoaPods](https://cocoapods.org) is a dependency manager for Cocoa projects. For usage and installation instructions, visit their website. To integrate JKDrawer into your Xcode project using CocoaPods, specify it in your `Podfile`:\n\n```ruby\npod 'JKDrawer', '~\u003e 0.6.0'\n```\n\n### Carthage\n\n[Carthage](https://github.com/Carthage/Carthage) is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks. To integrate JKDrawer into your Xcode project using Carthage, specify it in your `Cartfile`:\n\n```ogdl\ngithub \"johankool/Drawer\" ~\u003e 0.6.0\n```\n\n### Swift Package Manager\n\nThe [Swift Package Manager](https://swift.org/package-manager/) is a tool for automating the distribution of Swift code and is included with Xcode 11+. To integrate JKDrawer into your Xcode project using Swift Package Manager, paste this URL into Xcode via File \u003e Swift Packages \u003e Add Package Dependency:\n\n```\nhttps://github.com/johankool/Drawer.git\n```\n\n## Usage\n\nTo be able to present a view controller as a drawer it must conform to the `DrawerPresentable` protocol. This protocol requires that configuration variable is present. This is a `DrawerConfiguration` struct specifying certain aspects like initial offset and allowed range. \n\n```swift\nclass DrawerViewController: UIViewController, DrawerPresentable {\n\n    var configuration = DrawerConfiguration(offset: 300, isDraggable: true, isClosable: false)\n\n}\n```\n\nThe presenting view controller must conform to the `DrawerPresenting` protocol. Some methods have default implementations, others are callbacks for your convenience.\n\n```swift\nclass HostViewController: UIViewController, DrawerPresenting {\n\n    func someAction() {\n        let drawerViewController = DrawerViewController()\n        openDrawer(drawerViewController, animated: true)\n    }\n\n    func willOpenDrawer(_ drawer: DrawerPresentable) {\n\n    }\n\n    func didOpenDrawer(_ drawer: DrawerPresentable) {\n\n    }\n\n    func willCloseDrawer(_ drawer: DrawerPresentable) {\n\n    }\n\n    func didCloseDrawer(_ drawer: DrawerPresentable) {\n\n    }\n\n    func didChangeSizeOfDrawer(_ drawer: DrawerPresentable, to size: CGFloat) {\n\n    }\n\n}\n```\n\n### Navigation Controllers\n\nSince you can't open a drawer over a `UINavigationController`, consider using a custom view controller wrapping the `UINavigationController` instead or use `DrawerNavigationController`.\n\n## License\n\nCopyright (c) 2018-2021 Johan Kool\n\nLicensed under the [MIT license](LICENSE.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohankool%2Fdrawer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjohankool%2Fdrawer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohankool%2Fdrawer/lists"}