mirror of
https://github.com/joncardasis/ChromaColorPicker.git
synced 2024-11-22 06:32:06 +03:00
Merge pull request #49 from pvieito/master
[Package] Added SwiftPM support and added fix to ensure the currentHandle exists before first interaction
This commit is contained in:
commit
4fa7a0b3cb
27
Package.swift
Normal file
27
Package.swift
Normal file
@ -0,0 +1,27 @@
|
||||
// swift-tools-version:5.0
|
||||
|
||||
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