All Projects → naturaln0va → RAScrollablePickerView

naturaln0va / RAScrollablePickerView

Licence: Apache-2.0 license
Lightweight HSB color picker view.

Programming Languages

swift
15916 projects
objective c
16641 projects - #2 most used programming language

Projects that are alternatives of or similar to RAScrollablePickerView

Handycontrols
Contains some simple and commonly used WPF controls based on HandyControl
Stars: ✭ 347 (+789.74%)
Mutual labels:  control, color-picker
RMGradientView
A Custom Gradient View Control for iOS with inspectable properties.
Stars: ✭ 24 (-38.46%)
Mutual labels:  control, custom
CustomTkinter
A modern and customizable python UI-library based on Tkinter
Stars: ✭ 1,626 (+4069.23%)
Mutual labels:  ui-design, custom
ColorPicker
Customizable Color Picker control for WPF
Stars: ✭ 57 (+46.15%)
Mutual labels:  control, color-picker
Xamarin.forms.breadcrumb
This is a breadcrumb navigation control that is complete automatic and uses the Navigation stack and page titles to generate the breadcrumbs.
Stars: ✭ 130 (+233.33%)
Mutual labels:  control, custom
Handycontrol
Contains some simple and commonly used WPF controls
Stars: ✭ 3,349 (+8487.18%)
Mutual labels:  control, color-picker
ColorPickerLib
A WPF/MVVM implementation of a themeable color picker control.
Stars: ✭ 44 (+12.82%)
Mutual labels:  control, color-picker
MsgBox
可携带附加消息的增强型消息框
Stars: ✭ 41 (+5.13%)
Mutual labels:  control
PDColorPicker
🎨 A simple, fast color picker for iOS apps.
Stars: ✭ 30 (-23.08%)
Mutual labels:  color-picker
colr pickr
Colr Pickr, a vanilla JavaScript color picker component built with SVGs, with features like saving colors. Similar design to the chrome-dev-tools color picker.
Stars: ✭ 27 (-30.77%)
Mutual labels:  color-picker
Cheesebaron.ColorPickers
Sample library with ports of different Color Picker implementations.
Stars: ✭ 14 (-64.1%)
Mutual labels:  color-picker
linux-control
Control your Linux laptop/desktop via Google Assistant
Stars: ✭ 46 (+17.95%)
Mutual labels:  control
mongoose-aggregate-paginate-v2
A cursor based custom aggregate pagination library for Mongoose with customizable labels.
Stars: ✭ 103 (+164.1%)
Mutual labels:  custom
guardian
Guardian is a tool for extensible and universal data access with automated access workflows and security controls across data stores, analytical systems, and cloud products.
Stars: ✭ 127 (+225.64%)
Mutual labels:  control
components
Example Components (Built with Tonic)
Stars: ✭ 62 (+58.97%)
Mutual labels:  ui-design
lightvue
The Emerging UI Component library designed for Vue 3.x & Vue 2.x
Stars: ✭ 78 (+100%)
Mutual labels:  ui-design
reinforcement learning course materials
Lecture notes, tutorial tasks including solutions as well as online videos for the reinforcement learning course hosted by Paderborn University
Stars: ✭ 765 (+1861.54%)
Mutual labels:  control
rc-scanner
Remote control your police scanner
Stars: ✭ 22 (-43.59%)
Mutual labels:  control
mint-ui
Design System | React UI components for web
Stars: ✭ 17 (-56.41%)
Mutual labels:  ui-design
GCPEditorPro
Amazingly fast and simple ground control points interface. ◎
Stars: ✭ 33 (-15.38%)
Mutual labels:  control

RAScrollablePickerView

Preview

Lightweight HSB color picker view in Swift.

Install

Carthage

Add the following to your Cartfile:

github "naturaln0va/RAScrollablePickerView"

The build the Cartfile:

carthage update --platform iOS

Then drag Carthage/Build/iOS/RAScrollablePickerView.framework into your Xcode project.

Finally add the import:

import RAScrollablePickerView

Manual

Just drop Framework/RAScrollablePickerView/RAScrollablePickerView/RAScrollablePickerView.swift in your project.

Usage

Then create 3 instances of the scrollable picker view and assign each a different type.

huePicker.delegate = self

saturationPicker.delegate = self
saturationPicker.type = .saturation
saturationPicker.hueValueForPreview = huePicker.value

brightnessPicker.delegate = self
brightnessPicker.type = .brightness
brightnessPicker.hueValueForPreview = huePicker.value

Finally make sure the parent view/viewcontroller conforms to RAScrollablePickerViewDelegate and add the required valueChanged method.

func valueChanged(_ value: CGFloat, type: PickerType) {
    switch type {
    case .hue:
        colorPreView.backgroundColor = UIColor(hue: value, saturation: saturationPicker.value, brightness: brightnessPicker.value, alpha: 1)
        saturationPicker.hueValueForPreview = value
        brightnessPicker.hueValueForPreview = value
    case .saturation:
        colorPreView.backgroundColor = UIColor(hue: huePicker.value, saturation: value, brightness: brightnessPicker.value, alpha: 1)
    case .brightness:
        colorPreView.backgroundColor = UIColor(hue: huePicker.value, saturation: saturationPicker.value, brightness: value, alpha: 1)
    }
}

Update a picker with a color

let colors: [UIColor] = [.systemBlue, .systemOrange, .systemYellow]
let startColor = colors.randomElement() ?? .systemPink

picker.set(color: startColor)

Contact

Feel free the reach out to me if you have an questions.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].