{"id":2654,"url":"https://github.com/GitHawkApp/ContextMenu","last_synced_at":"2025-08-03T00:32:17.377Z","repository":{"id":30355663,"uuid":"124683603","full_name":"GitHawkApp/ContextMenu","owner":"GitHawkApp","description":"An iOS context menu UI inspired by Things 3.","archived":false,"fork":false,"pushed_at":"2021-11-22T15:58:47.000Z","size":239,"stargazers_count":974,"open_issues_count":16,"forks_count":51,"subscribers_count":22,"default_branch":"master","last_synced_at":"2024-04-24T14:50:42.685Z","etag":null,"topics":["githawk","ios","menu","swift","things","uikit"],"latest_commit_sha":null,"homepage":"http://githawk.com/","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/GitHawkApp.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":"2018-03-10T17:59:20.000Z","updated_at":"2024-04-15T07:02:31.000Z","dependencies_parsed_at":"2022-07-20T04:47:33.824Z","dependency_job_id":null,"html_url":"https://github.com/GitHawkApp/ContextMenu","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GitHawkApp%2FContextMenu","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GitHawkApp%2FContextMenu/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GitHawkApp%2FContextMenu/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GitHawkApp%2FContextMenu/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GitHawkApp","download_url":"https://codeload.github.com/GitHawkApp/ContextMenu/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228510754,"owners_count":17931760,"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":["githawk","ios","menu","swift","things","uikit"],"created_at":"2024-01-05T20:16:19.349Z","updated_at":"2024-12-06T18:30:39.281Z","avatar_url":"https://github.com/GitHawkApp.png","language":"Swift","readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"/images/animation.gif\" /\u003e\n\u003c/p\u003e\n\n- Contextual menus with delightful animations and styles\n- Total control over menu contents using your own `UIViewController`s\n- Tons of feature and interaction customizations\n\n## Installation\n\nJust add `ContextMenu` to your Podfile and `pod install`. Done!\n\n```ruby\npod 'ContextMenu'\n```\nFor Carthage, just add `GitHawkApp/ContextMenu` to your Cartfile and `carthage bootstrap`.\n```ogdl\ngithub \"GitHawkApp/ContextMenu\"\n```\n\n## Usage\n\nShow the menu from one of your `UIViewController`s:\n\n```swift\nContextMenu.shared.show(\n  sourceViewController: self,\n  viewController: MyContentViewController()\n)\n```\n\nYou must provide a custom `UIViewController` to display in the menu. The only requirement is that you must set `preferredContentSize` to size your content.\n\n```swift\nclass MyContentViewController: UIViewController {\n  override func viewDidLoad() {\n    super.viewDidLoad()\n    title = \"Demo\"\n    preferredContentSize = CGSize(width: 200, height: 200)\n  }\n}\n```\n\n\u003cimg src=\"/images/basic.png\" /\u003e\n\n## Customizations\n\n### Display from a Source View\n\nAnimate the menu out from a button or view. `ContextMenu` will take care of layout so that your menu doesn't clip the screen.\n\n```swift\n@IBAction func onButton(_ sender: UIButton) {\n  ContextMenu.shared.show(\n    sourceViewController: self,\n    viewController: MyContentViewController(),\n    sourceView: sender\n  )\n}\n```\n\n### Container Style \u0026 Display\n\nUse `ContextMenu.Options` to change the appearance of the containing view.\n\n```swift\nContextMenu.shared.show(\n  sourceViewController: self,\n  viewController: MenuViewController(),\n  options: ContextMenu.Options(containerStyle: ContextMenu.ContainerStyle(backgroundColor: .blue)),\n  sourceView: button\n)\n```\n\n\u003cimg src=\"/images/blue.png\" /\u003e\n\nThere's plenty more you can customize with `ContextMenu.ContainerStyle`:\n\n- `cornerRadius`: The corner radius of the menu\n- `shadowRadius` and `shadowOpacity`: Appearance of the container shadow\n- `xPadding`, `yPadding`, `edgePadding`: Padding from the source view and screen edge\n- `overlayColor`: The color of the background\n- `motionEffect`: Respond to device gyroscope changes, similar to app icons on Springboard.app.\n\nIf you want more customizations, we will gladly accept a Pull Request!\n\n## Acknowledgements\n\n- Inspiration from [Things 3](https://culturedcode.com/things/)\n- Created with ❤️ by [Ryan Nystrom](https://twitter.com/_ryannystrom)","funding_links":[],"categories":["UI","uikit","Content"],"sub_categories":["Menu","Other free courses"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FGitHawkApp%2FContextMenu","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FGitHawkApp%2FContextMenu","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FGitHawkApp%2FContextMenu/lists"}