blob: 115145e2b6528ff691fc2b295340118be0665043 [file] [log] [blame]
{
"name": "SwiftyKnob",
"version": "0.0.8",
"summary": "An easy way to add knobs in your app",
"description": "# SwiftyKnob\n\n[![Version](https://img.shields.io/cocoapods/v/SwiftyKnob.svg?style=flat)](http://cocoapods.org/pods/SwiftyKnob)\n![Swift 3.0.x](https://img.shields.io/badge/Swift-3.0.x-orange.svg)\n\nSwiftyKnob allows you to easily add knobs in your iOS apps.\n\n![SwiftyKnob demo](https://github.com/jevin/SwiftyKnob/blob/master/images/SwiftyKnob.gif)\n\n## Installation\n\n**Via [Cocoapods](https://cocoapods.org/)**\n\n```ruby\npod \"SwiftyKnob\"\n```\n\n**Manually**\n\nJust drag the `Knob.swift` in `SwiftyKnob/Classes/` to your project tree and you're ready to go.\n\n## Usage\n\n### Code only\n\n```swift\nvar knob = Knob(frame: CGRect(x: 8, y: 20, width: 100, height: 100),\n borderWidth: 18,\n borderColor: UIColor.red,\n value: 0.78, \n text: \"78%\",\n description: \"open rate\"\n)\n\nview.addSubview(knob)\n```\nSimply initialize the `Knob` class with the wanted parameters and add it to the view. The knob will animate automatically when needed. \n\nFor a detailed description of the `Knob` initializer see the following table:\n\nParameter | Description\n--- | ---\nframe | The rectangle defining the size and position of the knob\nborderWidth | The width of the knob's border\nborderColor | The color of the above border\nvalue | The value of the knob. Should be between 0.0 and 1.0\ntext | The main text, displayed at the center of the knob\ndescription | A smaller description, displayed below the text above\n\n### Storyboard\n\n**Step 1:** Add a `UIView` to your scene\n\n**Step 2:** Make `Knob` the custom class of your view\n![Image 1](https://github.com/jevin/SwiftyKnob/blob/master/images/storyboard-1.png)\n\n**Step 3:** Customize your knob using the exposed attributes\n![Image 2](https://github.com/jevin/SwiftyKnob/blob/master/images/storyboard-2.png)\n\n## Contributing\n\n1. Fork it!\n2. Create your feature branch: `git checkout -b my-new-feature`\n3. Commit your changes: `git commit -am 'Add some feature'`\n4. Push to the branch: `git push origin my-new-feature`\n5. Submit a pull request\n\n## Credits\n\nThanks to [@mikedev](https://twitter.com/mikedev) for his [awesome answer](http://stackoverflow.com/questions/26578023/animate-drawing-of-a-circle/26578895#26578895) on StackOverflow about `CAShapeLayer` and `CABasicAnimation`!\n\n## License\n\nSwiftyKnob is available under the MIT License. See the LICENSE file for more info.\n\nIf you like what I do, you should follow me on Twitter: [@jevinsew](https://twitter.com/jevinsew/) ✌️",
"homepage": "https://github.com/jevin/SwiftyKnob.git",
"license": "MIT",
"authors": {
"jevin": "jevin9@gmail.com"
},
"social_media_url": "http://twitter.com/jevinsew",
"platforms": {
"ios": "8.0"
},
"source": {
"git": "https://github.com/jevin/SwiftyKnob.git",
"tag": "0.0.8"
},
"source_files": "SwiftyKnob/Classes/**/*",
"pushed_with_swift_version": "3.1"
}