Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tapptitude/ttfortunewheel-ios
Fortune spinning wheel that supports custom drawing.
https://github.com/tapptitude/ttfortunewheel-ios
core dynamic fortune graphics ios lucky rotating spinning swift swift4 wheel
Last synced: about 18 hours ago
JSON representation
Fortune spinning wheel that supports custom drawing.
- Host: GitHub
- URL: https://github.com/tapptitude/ttfortunewheel-ios
- Owner: tapptitude
- License: mit
- Created: 2017-10-31T09:46:27.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-12-03T13:45:14.000Z (almost 5 years ago)
- Last Synced: 2024-04-26T06:01:01.327Z (7 months ago)
- Topics: core, dynamic, fortune, graphics, ios, lucky, rotating, spinning, swift, swift4, wheel
- Language: Swift
- Homepage:
- Size: 3.09 MB
- Stars: 131
- Watchers: 9
- Forks: 39
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# TTFortuneWheel-iOS
![](https://img.shields.io/badge/Swift-4.0-green.svg?style=flat)
[![Platform](https://img.shields.io/cocoapods/p/TTFortuneWheel.svg)](https://cocoapods.org/pods/TTFortuneWheel)
[![Version](https://img.shields.io/cocoapods/v/TTFortuneWheel.svg)](https://cocoapods.org/pods/TTFortuneWheel)
[![License](https://img.shields.io/cocoapods/l/TTFortuneWheel.svg?style=flat)](http://cocoapods.org/pods/TTFortuneWheel)
[![Twitter](https://img.shields.io/badge/[email protected]?style=flat)](http://twitter.com/Tapptitude)## About
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.
![](Resources/example1.gif)
## Features:
- Dynamic content
- Each slice can have it's own style and angle
- Drawn and animated using CoreGraphics
- Customize(Font, Slice Color, Stroke, Frame color, width and shadow)
- Predictible rotation to any slice
- Exposes methods for custom Core Graphics drawings for each slice
- Dynamic size## Requirements
- iOS 9.0+
- Xcode 8.2+## Installation
_CocoaPods_
_Swift 5.0_
```ruby
pod 'TTFortuneWheel'
```_Swift 4.2_
```ruby
pod 'TTFortuneWheel', '~>0.1.6'
```_Swift 4.0_
```ruby
pod 'TTFortuneWheel', '~>0.1.5'
```_Carthage_
```
github "tapptitude/TTFortuneWheel-iOS"
```_Manually_
Add contents of TTFortuneWheel folder to your project.
## Usage
You can place the FortuneWheel in your storyboard or add it as sa subview programatically.
```swift
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)
}
```
## How to customize?In order to provide custom drawing for slices you have to implement `FortuneWheelSliceProtocol`.
or can use the preconfiugred `FortuneWheelSliceImpl` class.## Contribution
Feel free to Fork, submit Pull Requests or send us your feedback and suggestions!
## License
TTFortuneWheel is available under the MIT license. See the LICENSE file for more info.