{"id":2603,"url":"https://github.com/bradjasper/radialmenu","last_synced_at":"2026-03-14T04:33:00.136Z","repository":{"id":17722928,"uuid":"20550873","full_name":"bradjasper/RadialMenu","owner":"bradjasper","description":"RadialMenu is a custom control for providing a touch context menu (like iMessage recording in iOS 8) built with Swift \u0026 POP","archived":false,"fork":false,"pushed_at":"2022-08-15T19:50:21.000Z","size":9101,"stargazers_count":301,"open_issues_count":4,"forks_count":27,"subscribers_count":16,"default_branch":"master","last_synced_at":"2024-08-16T04:31:30.747Z","etag":null,"topics":["animation","cocoa","custom-controls","pop","radialmenu","swift","user-interface"],"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/bradjasper.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":"2014-06-06T04:00:22.000Z","updated_at":"2024-08-09T13:29:53.000Z","dependencies_parsed_at":"2022-08-26T07:41:21.781Z","dependency_job_id":null,"html_url":"https://github.com/bradjasper/RadialMenu","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bradjasper%2FRadialMenu","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bradjasper%2FRadialMenu/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bradjasper%2FRadialMenu/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bradjasper%2FRadialMenu/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bradjasper","download_url":"https://codeload.github.com/bradjasper/RadialMenu/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":["animation","cocoa","custom-controls","pop","radialmenu","swift","user-interface"],"created_at":"2024-01-05T20:16:18.099Z","updated_at":"2025-12-16T22:04:36.123Z","avatar_url":"https://github.com/bradjasper.png","language":"Swift","funding_links":[],"categories":["UI"],"sub_categories":["Menu","Layout","Other free courses"],"readme":"# RadialMenu\n\n**Experimental Software:** Fun to play with, but probably shouldn't put it in production (yet).\n\nRadialMenu is a custom control that allows you to provide a context menu to a user on a touch screen (generally after a long press). This is similar to the record functionality Apple introduced for iMessage in iOS 8.\n\nHere's an example of the iMessage menu recreated, taken from the demo app:\n\n![iMessage RadialMenu Custom Control Example](https://raw.githubusercontent.com/bradjasper/RadialMenu/master/images/imessage-radialmenu-screencast-example.gif)\n\nYou can create your own custom menus as well\n\n![Custom RadialMenu Control Example](https://raw.githubusercontent.com/bradjasper/RadialMenu/master/images/default-radialmenu-screencast-example.gif)\n\nPlus it's built with Facebook POP, so it's very flexible!\n\nRead the blog entry at http://bradjasper.com/blog/radialmenu-imessage-ios8/ for more information.\n\n## Install\n\nCopy the source files from the RadialMenu/ directory into your project.\n\n\n## How to use?\n\nThere are two examples provided which show how to use the control in detail (download and run the Xcode project). At a highlevel:\n\n\n```swift\n// Create a radial submenu (it's just a UIView subclass)\nlet subMenuRed = RadialSubMenu(frame: frameOfSubMenu)\nsubMenuRed.userInteractionEnabled = true\nsubMenuRed.layer.cornerRadius = subMenuRadius\nsubMenuRed.layer.backgroundColor = UIColor.redColor()\nsubMenuRed.layer.borderColor = UIColor.blackColor()\nsubMenuRed.layer.borderWidth = 1\nsubMenuRed.tag = tag\n\n\n// Create multiple submenus and assign to array\nlet subMenus = [subMenuRed, subMenuBlue, ...]\n\n\n// Initialize the radial menu\nlet radialMenu = RadialMenu(menus: subMenus, radius: menuRadius)\nradialMenu.center = view.center\nradialMenu.openDelayStep = 0.05\nradialMenu.closeDelayStep = 0.00\nradialMenu.minAngle = 180\nradialMenu.maxAngle = 360\nradialMenu.activatedDelay = 1.0\nradialMenu.backgroundView.alpha = 0.0\n\n// Setup event handlers for specific actions\nradialMenu.onOpen = {\n    // menu has opened\n}\n\nradialMenu.onHighlight = { subMenu in\n    // perform highlight change\n}\n\nradialMenu.onActivate = { subMenu in\n    // did select subMenu\n}\n\n\n// Setup menu to show when pressing a button\nlet longPress = UILongPressGestureRecognizer(target: self, action: \"pressedButton:\")\nbutton.addGestureRecognizer(longPress)\n\n// Gesture handler can react to menu in different ways depending what you want\n// (for example, keeping the menu open if nothing is selected)\nfunc pressedButton(gesture:UIGestureRecognizer) {\n    switch(gesture.state) {\n        case .Began:\n            radialMenu.openAtPosition(button.center)\n        case .Ended:\n            radialMenu.close()\n        case .Changed:\n            radialMenu.moveAtPosition(gesture.locationInView(self.view))\n        default:\n            break\n    }\n}\n```\n\n\n## Todo\n\n- Documentation\n- Convert to NSControl sublcass\n- Figure out CocoaPods/framework distribution for Swift\n- Fix other FIXME's \u0026 TODO's in source code\n\n## LICENSE\n\nMIT\n\n## Read More\n\n* Blog entry: http://bradjasper.com/blog/radialmenu-imessage-ios8/\n* ALRadial (path radial menu): https://github.com/alattis/ALRadial\n* What product designers can learn from iOS 8's iMessage changes: http://scotthurff.com/posts/what-we-can-learn-from-apples-imessage-changes-in-ios-8\n* PininterestLikeMenu: https://github.com/itouch2/PinterestLikeMenu\n\n## Contact\n\nWeb: http://bradjasper.com\u003cbr\u003e\nTwitter: \u003ca href=\"https://twitter.com/bradjasper\"\u003e@bradjasper\u003c/a\u003e\u003cbr\u003e\nEmail: \u003ca href=\"mailto:contact@bradjasper.com\"\u003econtact@bradjasper.com\u003c/a\u003e\u003cbr\u003e\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbradjasper%2Fradialmenu","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbradjasper%2Fradialmenu","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbradjasper%2Fradialmenu/lists"}