Fortune spinning wheel that supports custom drawing and dynamic content.
This project is maintained by Tapptitude, a mobile app development agency specialized in building high-quality iOS and Android mobile apps, for startups and brands alike. A lively team of skilled app developers and app designers based in Europe, we provide full-stack mobile app development services to entrepreneurs looking to innovate on mobile.
CocoaPods
Swift 5.0
pod 'TTFortuneWheel'
Swift 4.2
pod 'TTFortuneWheel', '~>0.1.6'
Swift 4.0
pod 'TTFortuneWheel', '~>0.1.5'
Carthage
github "tapptitude/TTFortuneWheel-iOS"
Manually
Add contents of TTFortuneWheel folder to your project.
You can place the FortuneWheel in your storyboard or add it as sa subview programatically.
override func viewDidLoad() {
super.viewDidLoad()
let slices = [ FortuneWheelSlice(title: "Slice 1"),
FortuneWheelSlice(title: "Slice 2"),
FortuneWheelSlice(title: "Slice 3")]
let fortuneWheel = TTFortuneWheel(frame: frame, slices:slices)
spinningWheel.equalSlices = true
self.view.addSubview(fortuneWheel)
}
In order to provide custom drawing for slices you have to implement FortuneWheelSliceProtocol
.
or can use the preconfiugred FortuneWheelSliceImpl
class.
Feel free to Fork, submit Pull Requests or send us your feedback and suggestions!
TTFortuneWheel is available under the MIT license. See the LICENSE file for more info.