Introducing SMWheelControl

Today I am proud to announce the availability of a new Pod for iOS which will be included in my forthcoming app.

SMWheelControl

SMWheelControl is an iOS control allowing the selection of an item from a 360┬░ spinning wheel with a smooth inertial rotation.

The code, released under the BSD 3-clause license, is loosely based on the tutorial “How To Create a Rotating Wheel Control with UIKit” published on this Ray Wenderlich’s post by Cesare Rocchi

As usual, you can insert it into your podfile by adding

Some howto follows.

Usage

Initialization and data source

Instantiate the control with a classical - (id)initWithFrame:(CGRect)rect and add a target as you usually do with a control, e.g.:

Then add a dataSource:

and implement the following methods (the dataSource should conform to the SMWheelControlDataSource):

For instance:

When the wheel ends snapping to the closest slice, if you added a target, then it will receive the event UIControlEventValueChanged, and the selector you specified will be executed.