/RoundDropMenu

iOS menu written on Swift that ideally suits small sets of visual data.

Primary LanguageSwiftMIT LicenseMIT

Round-Drop-Menu

Build Status

Simple highly customizable iOS component written in Swift gives you another way to represent data. Round-Drop-Menu is great for small sets of visual information.

Installation

RoundDropMenu is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'RoundDropMenu'

Usage

Round-Drop-Menu usage is very similar to UITableView or UICollectionView. You should simply:

  1. Place RoundDropMenu in your View Controller.
  2. Conform your View Controller to RoundDropMenuDataSource and implement two methods:
  • numberOfDropsInRoundDropMenu(menu: RoundDropMenu) -> Int
  • roundDropMenu(menu: RoundDropMenu, dropViewForIndex index: Int) -> DropView
  1. Set RoundDropMenu dataSource to your View Controller.
  2. Optionally conform to RoundDropMenuDelegate to get method roundDropMenu(menu: RoundDropMenu, didSelectDropWithIndex index: Int)

Customization

You can change appearance of menu by setting next properties:

DropView:
  • color - default color of the drops
  • highlitedColor - color of view in highlithed state.
RoundDropMenu:
  • color - color of the oval in the center of menu.
  • offset - padding from view bounds to oval.
  • maxDropRadius - radius of the drop in the center of menu.
  • minDropRadius - minimal radius of the drop.

TODOs:

  • CocoaPods/Carthage/SPM
  • Implement scroll deceleration
  • More customization options

Author