mirror of
https://github.com/joncardasis/ChromaColorPicker.git
synced 2024-11-29 02:56:30 +03:00
Update readme
This commit is contained in:
parent
1eb6bd5d23
commit
ac92bef8c6
@ -27,7 +27,6 @@ class ViewController: UIViewController {
|
||||
|
||||
private func setupColorPicker() {
|
||||
colorPicker.translatesAutoresizingMaskIntoConstraints = false
|
||||
colorPicker.showsBrightnessSlider = true
|
||||
view.addSubview(colorPicker)
|
||||
|
||||
let verticalOffset = -defaultColorPickerSize.height / 6
|
||||
|
22
README.md
22
README.md
@ -15,6 +15,21 @@ An intuitive HSB color picker built in Swift. Supports multiple selection handle
|
||||
|
||||
> TODO: Image / GIF
|
||||
|
||||
## Examples
|
||||
```Swift
|
||||
let colorPicker = ChromaColorPicker(frame: CGRect(x: 0, y: 0, width: 300, height: 300))
|
||||
addSubview(colorPicker)
|
||||
|
||||
// Optional: Add multiple handles to the color picker
|
||||
|
||||
// Optional: Attach a ChromaBrightnessSlider to a ChromaColorPicker
|
||||
let brightnessSlider = ChromaBrightnessSlider(frame: CGRect(x: 0, y: 0, width: 280, height: 32))
|
||||
addSubview(brightnessSlider)
|
||||
|
||||
colorPicker.connect(brightnessSlider) // or `brightnessSlider.connect(to: colorPicker)`
|
||||
|
||||
```
|
||||
|
||||
## Installation
|
||||
### Carthage
|
||||
```
|
||||
@ -28,10 +43,11 @@ pod 'ChromaColorPicker'
|
||||
### Manually
|
||||
Add all files from the `Source` folder to your project.
|
||||
|
||||
## Examples
|
||||
```Swift
|
||||
```
|
||||
## Components
|
||||
|
||||
### ChromaColorPicker
|
||||
|
||||
### ChromaBrightnessSlider
|
||||
|
||||
### Supported UIControlEvents
|
||||
| Event | Description |
|
||||
|
Loading…
Reference in New Issue
Block a user