Latest0.1.0
Homepagehttps://github.com/ozwio/irisView
LicenseMIT
Platformsios 9.0
Authors

irisView

CI Status
Version
License
Platform

Features

  • [X] Pure Swift 3.
  • [X] Beautiful Colorful Picker.

irisView

Setup

import irisView
let colorPicker = irisView(frame: CGRect(x: 0, y: 0, width: pickerWidth, height: pickerHeight))
colorPicker.colors = [UIColor.red, UIColor.blue, ...]
colorPicker.center = CGPoint(x: view.frame.width/2, y: view.frame.height/2)
colorPicker.radius = pickerWidth/2
colorPicker.isShadowed = true
view.addSubview(colorPicker)
override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) {
        colorPicker.detect(touches, with: event)
}

override func touchesMoved(_ touches: Set<UITouch>, with event: UIEvent?) {
        colorPicker.detect(touches, with: event)
}

override func touchesEnded(_ touches: Set<UITouch>, with event: UIEvent?) {
        colorPicker.detect(touches, with: event, end: true)
}

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

To get the selected picker, add this code.

override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) {
        colorPicker.detect(touches, with: event)

        do {
            let obj = try colorPicker.detected()
            print("i: (obj.0), layer: (obj.1)")
        } catch {}
}

Requirements

Installation

irisView is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod 'irisView'

Author

ozwio, [email protected]

License

irisView is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "irisView",
    "version": "0.1.0",
    "summary": "irisView is a beautiful color picker for ios",
    "description": "irisView is a beautiful color picker for ios.",
    "homepage": "https://github.com/ozwio/irisView",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "ozwio": "[email protected]"
    },
    "source": {
        "git": "https://github.com/ozwio/irisView.git",
        "tag": "0.1.0"
    },
    "platforms": {
        "ios": "9.0"
    },
    "source_files": "irisView/Classes/**/*",
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This