An animated light and easy to use circular menu for you app, made with love and SwiftUI.
CDCircularMenu is a customizable circular menu library created for fun, for you apps.
- An animated Circular Menu around a customizable button
- A set of configuration to fit your app design
- Depends on your thoughts
- menuItems: Your custom list of menu items to be placed around the menu button
- menuRadius: The menu radius
- menuButtonSize: Your main menu button size
- menuButtonColor: Your main menu button color
- buttonClickCompletion: The callback handler whenever a menu item is clicked
- iOS 13 or above
- Swift 5.0
- Xcode 11.4
At the moment, the library is only available though Github. A Pod will arrive later.
You can use Git to clone CDCircularMenu
and its example project:
git clone https://github.com/christophedellac/CDCircularMenu
- Download and drop the
Sources
(CDCircularMenu/Sources) folder in your project. - You are already ready to go! Congratulations!
To get the full benefits of CDCircularMenu
, don't forget to check out the ExampleForCircularMenu XCode project.
After adding the source folder into your project, you can start using CDCircularMenu
by following those 3 steps:
-
Step 1: Create your menu items array thanks to the provided MenuItem struct.
-
**Step 2: Create your own completion handler. It should receive an Int (index) as parameter. **
-
**Step 3: Anywhere in your view, create a CircularMenu(...) with the required parameters. **
For example:
CircularMenu(menuItems: testMenuItems, menuRadius: 120, menuButtonSize: 60, menuButtonColor: .black,
buttonClickCompletion: buttonClickHandler(_:))
CDCircularMenu
is under the MIT LICENSE
.
Feel free to share your opinion :)
Christophe Dellac - https://github.com/christophedellac/ CDCircularMenu - https://github.com/christophedellac/CDCircularMenu