Skip to content

igorolrev/Rotary

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rotary

Bitrise Carthage Swift

Usage

import Rotary

struct Dancer: WheelOption {
    let name: String
    var wheelOptionTitle: String {
        return name
    }
}

let wheelControl = RotaryWheelControl<Dancer>()
wheelControl.rotationEnded = { [unowned self] dancer in
    self.label.text = "The current selection is \(dancer.name)"
}
wheelControl.layout([
    Dancer(name: "Joanne"),
    Dancer(name: "Stacey"),
    Dancer(name: "Rhian"),
    Dancer(name: "Cathy"),
    Dancer(name: "Robin")
    ])
wheelControl.styling = RotaryWheelStyling(
                                    font: <placeholder>,
                                    textColour: <placeholder>,
                                    spindleColour: <placeholder>,
                                    backgroundColour: <placeholder>,
                                    innerGrooveColour: <placeholder>,
                                    outerGrooveColour: <placeholder>
                                )
view.addSubview(wheelControl)

The closure 'rotationEnded' is called immediately after layout. If you do not want this behaviour, call layout before you assign the closure.

Demo

Tap the following image to launch Appetize.

Preview

About

A customisable rotary wheel UI component.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages