by hu55a1n1

Rotating circle menu written in Swift 3

123 Stars 15 Forks Last release: Not found MIT License 13 Commits 0 Releases

Available items

No Items, yet!

The developer of this repository has not created any items for sale yet. Need a bug fixed? Help with integration? A different license? Create a request here:


A rotating circle menu written in Swift 3.


  • Gesture based rotation
  • Configurable rotatability
  • High customisability
  • Simple intuitive API
  • Inertia effect
  • Ready to use samples


Swift-CircleMenu in action in CETUS iOS App.

simulator screen shot dec 3 2016 9 17 45 pm simulator screen shot dec 3 2016 9 17 30 pm

Getting Started

Add this to your

pod 'Swift-CircleMenu', :git => 'https://github.com/Sufi-Al-Hussaini/Swift-CircleMenu.git'


Please look at the demo project provided.

Basically, you'll need to create a circle and setup its frame & positioning, and add it to your view. Optionally, you may add an overlay.

Don't forget to set the

class DefaultRotatingViewController: UIViewController {

override func viewDidLoad() {

func prepareDefaultCircleMenu() {
    // Create circle
    let circle = Circle(with: CGRect(x: 10, y: 90, width: 300, height: 300), numberOfSegments: 10, ringWidth: 80.0)
    // Set dataSource and delegate
    circle.dataSource = self
    circle.delegate = self

    // Position and customize
    circle.center = view.center

    // Create overlay with circle
    let overlay = CircleOverlayView(with: circle)

    // Add to view


Then, you need to conform to the

protocols by implementing the
didMoveTo segment:
iconForThumbAt row:
extension DefaultRotatingViewController: CircleDelegate, CircleDataSource {

func circle(_ circle: Circle, didMoveTo segment: Int, thumb: CircleThumb) {
    let alert = UIAlertController(title: "Selected", message: "Item with tag: \(segment)", preferredStyle: UIAlertControllerStyle.alert)
    alert.addAction(UIAlertAction(title: "OK", style: UIAlertActionStyle.cancel, handler: nil))
    self.present(alert, animated: true, completion: nil)

func circle(_ circle: Circle, iconForThumbAt row: Int) -> UIImage {
    return UIImage(named: "icon_arrow_up")!


The above code will give you the default minimal circle menu shown below.

simulator screen shot dec 3 2016 9 12 50 pm

You can disable rotation using

's optional default constructor parameter
like so:
let circle = Circle(with: CGRect(x: 10, y: 90, width: 300, height: 300), numberOfSegments: 10, ringWidth: 80.0, isRotating: false)

More examples to be added soon. :)


Swift-CircleMenu is licensed under the MIT license.

Why Swift-CircleMenu?

For an app I was developing recently, I wanted something like Android-CircleMenu, i.e. a rotatable circle menu. I came across a number of circle menus for iOS on github, but only one supported rotation with inertia effect - CDPieMenu. The problem with CDPieMenu though, is that it is written in Obj-C and isn't being maintained currently. So, I decided to rewrite CDPieMenu in swift and include in it all features I required in my app, and make it available publicly.


Swift-CircleMenu is (more than) heavily inspired by CDPieMenu - an Obj-C library written by Wojtek Czekalski. In its current form, this project is essentially a rewrite of CDPieMenu in Swift, with multiple bug-fixes and added features & examples. Special thanks to Wojtek Czekalski for his awesome CDPieMenu library!

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.