mirror of
https://github.com/joncardasis/ChromaColorPicker.git
synced 2024-11-22 06:32:06 +03:00
[Package] Added SwiftPM support and added fix to ensure the currentHandle exists event when no touch has started
The fix is required to ensure the that the brightness control works when is touched before the wheel.
This commit is contained in:
parent
a67e079958
commit
ce9b95782b
27
Package.swift
Normal file
27
Package.swift
Normal file
@ -0,0 +1,27 @@
|
||||
// swift-tools-version:5.2
|
||||
|
||||
import PackageDescription
|
||||
|
||||
let package = Package(
|
||||
name: "ChromaColorPicker",
|
||||
platforms: [
|
||||
.iOS(.v10)
|
||||
],
|
||||
products: [
|
||||
.library(
|
||||
name: "ChromaColorPicker",
|
||||
targets: ["ChromaColorPicker"]
|
||||
)
|
||||
],
|
||||
targets: [
|
||||
.target(
|
||||
name: "ChromaColorPicker",
|
||||
path: "Source"
|
||||
),
|
||||
.testTarget(
|
||||
name: "ChromaColorPickerTests",
|
||||
dependencies: ["ChromaColorPicker"],
|
||||
path: "Tests"
|
||||
)
|
||||
]
|
||||
)
|
@ -91,6 +91,10 @@ public class ChromaColorPicker: UIControl, ChromaControlStylable {
|
||||
handles.append(handle)
|
||||
colorWheelView.addSubview(handle)
|
||||
brightnessSlider?.trackColor = handle.color
|
||||
|
||||
if currentHandle == nil {
|
||||
currentHandle = handle
|
||||
}
|
||||
}
|
||||
|
||||
public func connect(_ slider: ChromaBrightnessSlider) {
|
||||
|
Loading…
Reference in New Issue
Block a user