Comments (5)
What do you mean by "published updates" ?
from flexcolorpicker.
I am using colorPicker(:selectedColor) and colorPicker(:confirmedColor)
and would like to call less frequently sendColorUpdate. In order to avoid flooding this interface
extension ColorPickerViewController: ColorPickerDelegate {
func colorPicker(_ colorPicker: ColorPickerController, selectedColor: UIColor, usingControl: ColorControl) {
sendColorUpdate(color: selectedColor)
}
func colorPicker(_ colorPicker: ColorPickerController, confirmedColor: UIColor, usingControl: ColorControl) {
sendColorUpdate(color: confirmedColor)
}
}
from flexcolorpicker.
ColorPickerDelegate
is called every time a user makes an interaction (moves finger on control etc.). This is standard behaviour user also by Cocoa Touch controls like UISlider
. If you need to trottle user interaction you should do it on your end, in the class that implements ColorPickerDelegate
.
from flexcolorpicker.
Also note that ColorPickerDelegate
is ment for eobserving color updates as they are happening. If you only need the final selected color, you can read the value (property selectedColor
of ColorPickerController
or DefaultColorPickerViewController
) when user leaves the screen, presses confirm button or similar.
from flexcolorpicker.
Got it working with your advice on ColorPickerDelegate. I have a throttler now
from flexcolorpicker.
Related Issues (20)
- SwiftUI support needed HOT 1
- When installed via SPM or CocoaPods unnecessary files are downloaded HOT 1
- Allow the Demo to be selectivelly installed and run via SPM
- ColorPicker Takes time to Load HOT 1
- iOS 13 dark mode support HOT 2
- Swift 5.2 complaint HOT 1
- 1.4.1 Won't Run HOT 4
- Add Other Rectangular Picker HOT 2
- Is it me or is does brightness work backwards? HOT 4
- Put examples how to work with custom view via code. HOT 4
- I want to change the ColorPicker Background color according to our desire.
- ColorPickerDelegate HOT 2
- Invalid Excludes when using with Xcode 13 HOT 2
- AutoLayout With ScrollView Crashing - iOS 15 Xcode 13 HOT 2
- Crash iOS15 HOT 19
- Memory leak HOT 1
- I want this Color picker in UIView. Can I subclass this..? HOT 1
- Can I have my custom colors in circle palette. HOT 1
- How to set custom colors to RadialPaletteControl.
- RectangularPaletteControl has 'open' function but not declared is 'open'
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flexcolorpicker.