https://github.com/guoyingtao/puffer
A swift tool for mimicking a rotation dial
https://github.com/guoyingtao/puffer
dial rotationdial swiftdial
Last synced: 11 months ago
JSON representation
A swift tool for mimicking a rotation dial
- Host: GitHub
- URL: https://github.com/guoyingtao/puffer
- Owner: guoyingtao
- License: mit
- Created: 2018-11-12T16:50:03.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2021-02-10T04:39:43.000Z (over 5 years ago)
- Last Synced: 2025-04-10T19:47:37.843Z (about 1 year ago)
- Topics: dial, rotationdial, swiftdial
- Language: Swift
- Homepage:
- Size: 877 KB
- Stars: 17
- Watchers: 5
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Puffer
A swift rotation dial.
You can use this tool to mimic a rotation dial just like what Photo.app does
## Features
* Show the whole dial with indicator
* Show only part of the dial.
* Rotation range can be limited.
* Default rotation center if the center of the dial. You can set your own rotation center.
* Customized colors.
## Requirements
* iOS 11.0+
* Xcode 10.0+
## Install
### CocoaPods
```ruby
pod 'Puffer', '~> 1.0.3'
```
You may also need the code below in your pod file if compile errors happen because of different swift version.
```ruby
post_install do |installer|
installer.pods_project.targets.each do |target|
if ['Mantis'].include? target.name
target.build_configurations.each do |config|
config.build_settings['SWIFT_VERSION'] = '5.0'
end
end
end
end
```
## Usage
* Create a default Rotation Dial
```swift
Puffer.createDial()
```
* Create a customized Rotation Dial
```swift
var config = Puffer.Config()
// Do some settings to config
...
Puffer.createDial(config: config)
```