Latest 0.1.0
Homepage https://github.com/julipopo/Circular-Menu
License MIT
Platforms ios 8.0
Authors

Circular Menu

Platform
Swift Version

Circular menu interactive, customizable in color, buttons, and actions delegate!
Available from 3 to 8 buttons.

++ Work in progress for more features ++

JCircularMenu

Installation

add the Pod JCircularMenu to your podfile

Creation

  • Step 1 : Initialize the menu in the ViewController class:
var circularMenu =  CircularMenu()
  • Step 2 : In the viewDidLoad, set the menu in its view, its the Color and its delegate :
circularMenu = CircularMenu(inView: view, withColor: UIColor.blue)
circularMenu.delegate = self
  • Step 3 : set the buttons with a title and your local icons (from 3 to 8) :
    menu.addButton(title: "Heel", imageName: "icon_heel")
    menu.addButton(title: "Truck", imageName: "icon_truck")
    menu.addButton(title: "Spider", imageName: "icon_spider")
    menu.addButton(title: "Brique", imageName: "icon_brique")
    menu.addButton(title: "Cardio", imageName: "icon_cardio")
    menu.addButton(title: "Path", imageName: "icon_path")
    menu.addButton(title: "Medecin", imageName: "icon_medecin")
  • Step 3 : add it to the view :
    view.addSubview(menu)

Delegate Event :

  • Create an extension of your ViewController who conform to CircularMenuDelegate protocol, with circularMenuDidSelect function :
extension ViewController: CircularMenuDelegate {
  func circularMenuDidSelect(atIndex index: Int) {
      //Do stuff once a button has been tapped
  }
}
  • Optional : you can listen event from the menu as circularMenuDidOpen() and circularMenuDidClose()

Latest podspec

{
    "name": "JCircularMenu",
    "version": "0.1.0",
    "summary": "Circular menu interactive, customizable in color, buttons, and actions delegate",
    "description": "Circular menu interactive, customizable in color, buttons, and actions delegate.",
    "homepage": "https://github.com/julipopo/Circular-Menu",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Julien Simmer": "[email protected]"
    },
    "source": {
        "git": "https://github.com/julipopo/Circular-Menu.git",
        "tag": "0.1.0"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "CircularMenu/CircularMenu.swift",
    "resources": "CircularMenu/Assets.xcassets",
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This