{"id":13475176,"url":"https://github.com/ykyouhei/KYDrawerController","last_synced_at":"2025-03-26T23:30:35.029Z","repository":{"id":32104375,"uuid":"35676651","full_name":"ykyouhei/KYDrawerController","owner":"ykyouhei","description":"Side Drawer Navigation Controller similar to Android","archived":false,"fork":false,"pushed_at":"2020-09-01T10:35:17.000Z","size":115,"stargazers_count":621,"open_issues_count":49,"forks_count":158,"subscribers_count":25,"default_branch":"master","last_synced_at":"2025-03-17T19:02:15.847Z","etag":null,"topics":["carthage","cocoapods","drawer","drawerviewcontroller","pod","storyboard","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/ykyouhei.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2015-05-15T13:51:34.000Z","updated_at":"2024-10-17T02:34:38.000Z","dependencies_parsed_at":"2022-07-12T09:24:37.052Z","dependency_job_id":null,"html_url":"https://github.com/ykyouhei/KYDrawerController","commit_stats":null,"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ykyouhei%2FKYDrawerController","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ykyouhei%2FKYDrawerController/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ykyouhei%2FKYDrawerController/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ykyouhei%2FKYDrawerController/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ykyouhei","download_url":"https://codeload.github.com/ykyouhei/KYDrawerController/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245753803,"owners_count":20666816,"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","drawer","drawerviewcontroller","pod","storyboard","swift"],"created_at":"2024-07-31T16:01:17.997Z","updated_at":"2025-03-26T23:30:34.582Z","avatar_url":"https://github.com/ykyouhei.png","language":"Swift","funding_links":[],"categories":["Swift","OOM-Leaks-Crash"],"sub_categories":["Side Drawer"],"readme":"# KYDrawerController\n\n[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)\n[![Pod Version](http://img.shields.io/cocoapods/v/KYDrawerController.svg?style=flat)](http://cocoadocs.org/docsets/KYDrawerController/)\n[![Pod Platform](http://img.shields.io/cocoapods/p/KYDrawerController.svg?style=flat)](http://cocoadocs.org/docsets/KYDrawerController/)\n[![Pod License](http://img.shields.io/cocoapods/l/KYDrawerController.svg?style=flat)](https://github.com/ykyohei/KYDrawerController/blob/master/LICENSE)\n[![Language](http://img.shields.io/badge/language-swift-brightgreen.svg?style=flat)](https://developer.apple.com/swift)\n![Swift version](https://img.shields.io/badge/swift-4.0-orange.svg)\n\n`KYDrawerController` is a side drawer navigation container view controller similar to Android.\n\n* Storyboard Support\n* AutoLayout Support\n\n![image.png](https://cloud.githubusercontent.com/assets/5757351/7665531/399a88c0-fbf6-11e4-8051-0d05fa4baa38.png \"image.png\") ![storyboard.png](https://cloud.githubusercontent.com/assets/5757351/7665532/399c740a-fbf6-11e4-9fb9-4913a8f2e446.png \"storyboard.png.png\")![drawer.gif](https://cloud.githubusercontent.com/assets/5757351/8270983/3e59cfe6-183a-11e5-8a9b-5a1ac1aee2bc.gif \"drawer.png\")\n\n\n## Installation\n\n### CocoaPods\n\n`KYDrawerController ` is available on CocoaPods.\nAdd the following to your `Podfile`:\n\n```ruby\npod 'KYDrawerController'\n```\n\n### Manually\nJust add the Classes folder to your project.\n\n\n## Usage\n(see sample Xcode project in `/Example`)\n\n### Code\n\n```Swift\nimport UIKit\nimport KYDrawerController\n\n@UIApplicationMain\nclass AppDelegate: UIResponder, UIApplicationDelegate {\n\n    var window: UIWindow?\n\n    func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -\u003e Bool {\n        // Override point for customization after application launch.\n        \n        let mainViewController   = MainViewController()\n        let drawerViewController = DrawerViewController()\n        let drawerController     = KYDrawerController()\n        drawerController.mainViewController = UINavigationController(\n            rootViewController: mainViewController\n        )\n        drawerController.drawerViewController = drawerViewController\n        \n        /* Customize\n        drawerController.drawerDirection = .Right\n        drawerController.drawerWidth     = 200\n        */\n       \n        window = UIWindow(frame: UIScreen.mainScreen().bounds)\n        window?.rootViewController = drawerController\n        window?.makeKeyAndVisible()\n        \n        return true\n    }\n```\n\n### Storyboard\n 1. Set the `KYDrawerController` to Custom Class of Initial ViewController.\n \n ![usage1.png](https://cloud.githubusercontent.com/assets/5757351/7665220/a9d378a8-fbe8-11e4-8eb3-a66f37bebece.png)\n \n 2.  Connects the `KYEmbedDrawerControllerSegue` to DrawerViewController from `KYDrawerController`\n \n ![usage2.png](https://cloud.githubusercontent.com/assets/5757351/7665217/a995f6ae-fbe8-11e4-811a-779814197a55.png \"usage2.png\")\n\n\n 3. Connects the `KYEmbedMainControllerSegue` to DrawerViewController from `KYDrawerController`\n\n ![usage3.png](https://cloud.githubusercontent.com/assets/5757351/7665218/a99a6748-fbe8-11e4-89d3-e599765f0eb6.png \"usage3.png\")\n\n\n 4. Set the SegueIdentifiers to inspector of `KYDrawerController`. \n\n ![usage4.png](https://cloud.githubusercontent.com/assets/5757351/7665219/a99c790c-fbe8-11e4-84bc-bf03b01e8a14.png \"usage4.png\")\n\n \n### Open/Close Drawer\n```Swift\nfunc setDrawerState(state: DrawerState, animated: Bool)\n```\n\n\n### Delegate\n```Swift\noptional func drawerController(_ drawerController: KYDrawerController, willChangeState state: KYDrawerController.DrawerState)\noptional func drawerController(_ drawerController: KYDrawerController, didChangeState state: KYDrawerController.DrawerState)\n```\n\n\n## Objective-C version\n\nhttps://github.com/AustinChou/KYDrawerController-ObjC\n\n## License\n\nThis code is distributed under the terms and conditions of the [MIT license](LICENSE). \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fykyouhei%2FKYDrawerController","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fykyouhei%2FKYDrawerController","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fykyouhei%2FKYDrawerController/lists"}