diff --git a/FlexColorPicker.podspec b/FlexColorPicker.podspec new file mode 100644 index 0000000..89d829a --- /dev/null +++ b/FlexColorPicker.podspec @@ -0,0 +1,43 @@ +# +# Be sure to run `pod lib lint FlexColorPicker.podspec' to ensure this is a +# valid spec before submitting. +# +# Any lines starting with a # are optional, but their use is encouraged +# To learn more about a Podspec see https://guides.cocoapods.org/syntax/podspec.html +# + +Pod::Spec.new do |s| + s.name = 'FlexColorPicker' + s.version = '1.0' + s.summary = 'Flexible color picker written in Swift 4.' + +# This description is used to generate tags and improve search results. +# * Think: What does it do? Why did you write it? What is the focus? +# * Try to keep it short, snappy and to the point. +# * Write the description between the DESC delimiters below. +# * Finally, don't worry about the indent, CocoaPods strips it! + + s.description = <<-DESC +TODO: Add long description of the pod here. + DESC + + s.homepage = 'https://github.com/RastislavMirek/FlexColorPicker' +# s.screenshots = 'https://github.com/RastislavMirek/FlexColorPicker/blob/master/SampleGifs/Flex_color_picker_for_swift_preview1.gif', 'https://github.com/RastislavMirek/FlexColorPicker/blob/master/SampleGifs/Flex_color_picker_for_swift_preview2.gif' + s.swift_version = '4.1' + s.license = { :type => 'MIT', :file => 'LICENSE' } + s.author = { 'Rastislav Mirek' => 'RastislavMirek@users.noreply.github.com' } + s.source = { :git => 'https://github.com/RastislavMirek/FlexColorPicker.git', :tag => s.version.to_s } + # s.social_media_url = 'https://twitter.com/' + + s.ios.deployment_target = '11.0' + + s.source_files = 'FlexColorPicker/Classes/**/*' + + s.resource_bundles = { + 'FlexColorPicker' => ['FlexColorPicker/Assets/**/*'] + } + + # s.public_header_files = 'Pod/Classes/**/*.h' + # s.frameworks = 'UIKit', 'MapKit' + # s.dependency 'AFNetworking', '~> 2.3' +end diff --git a/FlexColorPicker.xcworkspace/contents.xcworkspacedata b/FlexColorPicker.xcworkspace/contents.xcworkspacedata index dce7e39..13cab56 100644 --- a/FlexColorPicker.xcworkspace/contents.xcworkspacedata +++ b/FlexColorPicker.xcworkspace/contents.xcworkspacedata @@ -7,6 +7,25 @@ + + + + + + + + + + + + diff --git a/FlexColorPicker/FlexColorPicker/Colors.xcassets/BorderColor.colorset/Contents.json b/FlexColorPicker/Assets/Colors.xcassets/BorderColor.colorset/Contents.json similarity index 100% rename from FlexColorPicker/FlexColorPicker/Colors.xcassets/BorderColor.colorset/Contents.json rename to FlexColorPicker/Assets/Colors.xcassets/BorderColor.colorset/Contents.json diff --git a/FlexColorPicker/FlexColorPicker/Colors.xcassets/Contents.json b/FlexColorPicker/Assets/Colors.xcassets/Contents.json similarity index 100% rename from FlexColorPicker/FlexColorPicker/Colors.xcassets/Contents.json rename to FlexColorPicker/Assets/Colors.xcassets/Contents.json diff --git a/FlexColorPicker/FlexColorPicker/Colors.xcassets/LabelTextsColor.colorset/Contents.json b/FlexColorPicker/Assets/Colors.xcassets/LabelTextsColor.colorset/Contents.json similarity index 100% rename from FlexColorPicker/FlexColorPicker/Colors.xcassets/LabelTextsColor.colorset/Contents.json rename to FlexColorPicker/Assets/Colors.xcassets/LabelTextsColor.colorset/Contents.json diff --git a/FlexColorPicker/FlexColorPicker/Colors.xcassets/LightBorderColor.colorset/Contents.json b/FlexColorPicker/Assets/Colors.xcassets/LightBorderColor.colorset/Contents.json similarity index 100% rename from FlexColorPicker/FlexColorPicker/Colors.xcassets/LightBorderColor.colorset/Contents.json rename to FlexColorPicker/Assets/Colors.xcassets/LightBorderColor.colorset/Contents.json diff --git a/FlexColorPicker/FlexColorPicker/Colors.xcassets/ThumbViewWideBorderColor.colorset/Contents.json b/FlexColorPicker/Assets/Colors.xcassets/ThumbViewWideBorderColor.colorset/Contents.json similarity index 100% rename from FlexColorPicker/FlexColorPicker/Colors.xcassets/ThumbViewWideBorderColor.colorset/Contents.json rename to FlexColorPicker/Assets/Colors.xcassets/ThumbViewWideBorderColor.colorset/Contents.json diff --git a/FlexColorPicker/FlexColorPicker/Colors.xcassets/ThumbViewWideBorderDarkColor.colorset/Contents.json b/FlexColorPicker/Assets/Colors.xcassets/ThumbViewWideBorderDarkColor.colorset/Contents.json similarity index 100% rename from FlexColorPicker/FlexColorPicker/Colors.xcassets/ThumbViewWideBorderDarkColor.colorset/Contents.json rename to FlexColorPicker/Assets/Colors.xcassets/ThumbViewWideBorderDarkColor.colorset/Contents.json diff --git a/FlexColorPickerDemo/FlexColorPickerDemo/ColorPickerController.swift b/FlexColorPicker/Classes/ColorPickerController.swift similarity index 100% rename from FlexColorPickerDemo/FlexColorPickerDemo/ColorPickerController.swift rename to FlexColorPicker/Classes/ColorPickerController.swift diff --git a/FlexColorPicker/FlexColorPicker/ColorPickerControllerProtocol.swift b/FlexColorPicker/Classes/ColorPickerControllerProtocol.swift similarity index 100% rename from FlexColorPicker/FlexColorPicker/ColorPickerControllerProtocol.swift rename to FlexColorPicker/Classes/ColorPickerControllerProtocol.swift diff --git a/FlexColorPicker/FlexColorPicker/ColorPickerDelegate.swift b/FlexColorPicker/Classes/ColorPickerDelegate.swift similarity index 100% rename from FlexColorPicker/FlexColorPicker/ColorPickerDelegate.swift rename to FlexColorPicker/Classes/ColorPickerDelegate.swift diff --git a/FlexColorPicker/FlexColorPicker/ControlDelegates/ColorPaletteDelegate.swift b/FlexColorPicker/Classes/ControlDelegates/ColorPaletteDelegate.swift similarity index 100% rename from FlexColorPicker/FlexColorPicker/ControlDelegates/ColorPaletteDelegate.swift rename to FlexColorPicker/Classes/ControlDelegates/ColorPaletteDelegate.swift diff --git a/FlexColorPicker/FlexColorPicker/ControlDelegates/ColorSliderDelegate.swift b/FlexColorPicker/Classes/ControlDelegates/ColorSliderDelegate.swift similarity index 100% rename from FlexColorPicker/FlexColorPicker/ControlDelegates/ColorSliderDelegate.swift rename to FlexColorPicker/Classes/ControlDelegates/ColorSliderDelegate.swift diff --git a/FlexColorPicker/FlexColorPicker/ControlDelegates/ComponentSliderDelegates.swift b/FlexColorPicker/Classes/ControlDelegates/ComponentSliderDelegates.swift similarity index 100% rename from FlexColorPicker/FlexColorPicker/ControlDelegates/ComponentSliderDelegates.swift rename to FlexColorPicker/Classes/ControlDelegates/ComponentSliderDelegates.swift diff --git a/FlexColorPicker/FlexColorPicker/ControlDelegates/RadialHSBPaletteDelegate.swift b/FlexColorPicker/Classes/ControlDelegates/RadialHSBPaletteDelegate.swift similarity index 100% rename from FlexColorPicker/FlexColorPicker/ControlDelegates/RadialHSBPaletteDelegate.swift rename to FlexColorPicker/Classes/ControlDelegates/RadialHSBPaletteDelegate.swift diff --git a/FlexColorPicker/FlexColorPicker/ControlDelegates/RectangularHSBPaletteDelegate.swift b/FlexColorPicker/Classes/ControlDelegates/RectangularHSBPaletteDelegate.swift similarity index 100% rename from FlexColorPicker/FlexColorPicker/ControlDelegates/RectangularHSBPaletteDelegate.swift rename to FlexColorPicker/Classes/ControlDelegates/RectangularHSBPaletteDelegate.swift diff --git a/FlexColorPicker/FlexColorPicker/Controls/AbstractColorControl.swift b/FlexColorPicker/Classes/Controls/AbstractColorControl.swift similarity index 100% rename from FlexColorPicker/FlexColorPicker/Controls/AbstractColorControl.swift rename to FlexColorPicker/Classes/Controls/AbstractColorControl.swift diff --git a/FlexColorPicker/FlexColorPicker/Controls/AdjustedHitBoxColorControl.swift b/FlexColorPicker/Classes/Controls/AdjustedHitBoxColorControl.swift similarity index 100% rename from FlexColorPicker/FlexColorPicker/Controls/AdjustedHitBoxColorControl.swift rename to FlexColorPicker/Classes/Controls/AdjustedHitBoxColorControl.swift diff --git a/FlexColorPicker/FlexColorPicker/Controls/ColorControl.swift b/FlexColorPicker/Classes/Controls/ColorControl.swift similarity index 54% rename from FlexColorPicker/FlexColorPicker/Controls/ColorControl.swift rename to FlexColorPicker/Classes/Controls/ColorControl.swift index 32bd965..6304990 100644 --- a/FlexColorPicker/FlexColorPicker/Controls/ColorControl.swift +++ b/FlexColorPicker/Classes/Controls/ColorControl.swift @@ -28,9 +28,22 @@ import UIKit +/// Protocol to which all color picker controls must conform. This protocol defines contract of color controls. +/// +/// A color control is standalone view that should subclass `UIControl` which can be used to pick a color. Value of color control is stored in `selectedHSBColor` property. Color control sends `UIControlEvents.valueChanged` events to registered targets when its value (`selectedHSBColor`) changes as consequence of user interaction with the control. A color control can also send `UIControlEvents.primaryActionTriggered` when user takes action to confirm current selected color as final. +/// +/// A color control should be usable as standalone component but is usually used together with other color picker controls managed and synchornized by instance of `ColorPickerConrtoller`. public protocol ColorControl: class { + /// Override this and return `false` if you do not want to `UIControlEvents.primaryActionTriggered` events send by your color control to be considered confirmation of color selection. static var canConfirmColor: Bool { get } + /// The value of this color control. Represents current selected color. var selectedHSBColor: HSBColor { get } + + /// Sets `selectedHSBColor` and adjust visual state of the control according to that value. + /// + /// - Parameters: + /// - hsbColor: New value to be set as selected color of this picker color control. + /// - isInteractive: Whether new selected color was specified programatically or by user via interaction with another control. This can used to determine if some animations should be played. func setSelectedHSBColor(_ hsbColor: HSBColor, isInteractive: Bool) func addTarget(_ target: Any?, action: Selector, for: UIControlEvents) diff --git a/FlexColorPicker/FlexColorPicker/Controls/ColorPaletteControl.swift b/FlexColorPicker/Classes/Controls/ColorPaletteControl.swift similarity index 100% rename from FlexColorPicker/FlexColorPicker/Controls/ColorPaletteControl.swift rename to FlexColorPicker/Classes/Controls/ColorPaletteControl.swift diff --git a/FlexColorPicker/FlexColorPicker/Controls/ColorPreviewWithHex.swift b/FlexColorPicker/Classes/Controls/ColorPreviewWithHex.swift similarity index 100% rename from FlexColorPicker/FlexColorPicker/Controls/ColorPreviewWithHex.swift rename to FlexColorPicker/Classes/Controls/ColorPreviewWithHex.swift diff --git a/FlexColorPicker/FlexColorPicker/Controls/ColorSliderControl.swift b/FlexColorPicker/Classes/Controls/ColorSliderControl.swift similarity index 100% rename from FlexColorPicker/FlexColorPicker/Controls/ColorSliderControl.swift rename to FlexColorPicker/Classes/Controls/ColorSliderControl.swift diff --git a/FlexColorPicker/FlexColorPicker/Controls/ComponentSliderControls.swift b/FlexColorPicker/Classes/Controls/ComponentSliderControls.swift similarity index 100% rename from FlexColorPicker/FlexColorPicker/Controls/ComponentSliderControls.swift rename to FlexColorPicker/Classes/Controls/ComponentSliderControls.swift diff --git a/FlexColorPicker/FlexColorPicker/Controls/ControlWithThumbView.swift b/FlexColorPicker/Classes/Controls/ControlWithThumbView.swift similarity index 100% rename from FlexColorPicker/FlexColorPicker/Controls/ControlWithThumbView.swift rename to FlexColorPicker/Classes/Controls/ControlWithThumbView.swift diff --git a/FlexColorPicker/FlexColorPicker/Controls/PaletteControls.swift b/FlexColorPicker/Classes/Controls/PaletteControls.swift similarity index 100% rename from FlexColorPicker/FlexColorPicker/Controls/PaletteControls.swift rename to FlexColorPicker/Classes/Controls/PaletteControls.swift diff --git a/FlexColorPicker/FlexColorPicker/CustomColorPickerViewController.swift b/FlexColorPicker/Classes/CustomColorPickerViewController.swift similarity index 100% rename from FlexColorPicker/FlexColorPicker/CustomColorPickerViewController.swift rename to FlexColorPicker/Classes/CustomColorPickerViewController.swift diff --git a/FlexColorPicker/FlexColorPicker/DefaultColorPickerViewController.swift b/FlexColorPicker/Classes/DefaultColorPickerViewController.swift similarity index 100% rename from FlexColorPicker/FlexColorPicker/DefaultColorPickerViewController.swift rename to FlexColorPicker/Classes/DefaultColorPickerViewController.swift diff --git a/FlexColorPicker/FlexColorPicker/FlexColorPicker.h b/FlexColorPicker/Classes/FlexColorPicker.h similarity index 100% rename from FlexColorPicker/FlexColorPicker/FlexColorPicker.h rename to FlexColorPicker/Classes/FlexColorPicker.h diff --git a/FlexColorPicker/FlexColorPicker/HSBColor.swift b/FlexColorPicker/Classes/HSBColor.swift similarity index 100% rename from FlexColorPicker/FlexColorPicker/HSBColor.swift rename to FlexColorPicker/Classes/HSBColor.swift diff --git a/FlexColorPicker/FlexColorPicker/Info.plist b/FlexColorPicker/Classes/Info.plist similarity index 100% rename from FlexColorPicker/FlexColorPicker/Info.plist rename to FlexColorPicker/Classes/Info.plist diff --git a/FlexColorPicker/FlexColorPicker/Utilities/CGPointExtension.swift b/FlexColorPicker/Classes/Utilities/CGPointExtension.swift similarity index 100% rename from FlexColorPicker/FlexColorPicker/Utilities/CGPointExtension.swift rename to FlexColorPicker/Classes/Utilities/CGPointExtension.swift diff --git a/FlexColorPicker/FlexColorPicker/Utilities/CGRectExtension.swift b/FlexColorPicker/Classes/Utilities/CGRectExtension.swift similarity index 100% rename from FlexColorPicker/FlexColorPicker/Utilities/CGRectExtension.swift rename to FlexColorPicker/Classes/Utilities/CGRectExtension.swift diff --git a/FlexColorPicker/FlexColorPicker/Utilities/UIColorExtension.swift b/FlexColorPicker/Classes/Utilities/UIColorExtension.swift similarity index 100% rename from FlexColorPicker/FlexColorPicker/Utilities/UIColorExtension.swift rename to FlexColorPicker/Classes/Utilities/UIColorExtension.swift diff --git a/FlexColorPicker/FlexColorPicker/Utilities/UIImageExtension.swift b/FlexColorPicker/Classes/Utilities/UIImageExtension.swift similarity index 100% rename from FlexColorPicker/FlexColorPicker/Utilities/UIImageExtension.swift rename to FlexColorPicker/Classes/Utilities/UIImageExtension.swift diff --git a/FlexColorPicker/FlexColorPicker/Utilities/UIImageViewExtension.swift b/FlexColorPicker/Classes/Utilities/UIImageViewExtension.swift similarity index 100% rename from FlexColorPicker/FlexColorPicker/Utilities/UIImageViewExtension.swift rename to FlexColorPicker/Classes/Utilities/UIImageViewExtension.swift diff --git a/FlexColorPicker/FlexColorPicker/Utilities/UIViewExtension.swift b/FlexColorPicker/Classes/Utilities/UIViewExtension.swift similarity index 100% rename from FlexColorPicker/FlexColorPicker/Utilities/UIViewExtension.swift rename to FlexColorPicker/Classes/Utilities/UIViewExtension.swift diff --git a/FlexColorPicker/FlexColorPicker/Views/CircleShapedView.swift b/FlexColorPicker/Classes/Views/CircleShapedView.swift similarity index 100% rename from FlexColorPicker/FlexColorPicker/Views/CircleShapedView.swift rename to FlexColorPicker/Classes/Views/CircleShapedView.swift diff --git a/FlexColorPicker/FlexColorPicker/Views/ColorPickerThumbView.swift b/FlexColorPicker/Classes/Views/ColorPickerThumbView.swift similarity index 100% rename from FlexColorPicker/FlexColorPicker/Views/ColorPickerThumbView.swift rename to FlexColorPicker/Classes/Views/ColorPickerThumbView.swift diff --git a/FlexColorPicker/FlexColorPicker/Views/GradientView.swift b/FlexColorPicker/Classes/Views/GradientView.swift similarity index 100% rename from FlexColorPicker/FlexColorPicker/Views/GradientView.swift rename to FlexColorPicker/Classes/Views/GradientView.swift diff --git a/FlexColorPicker/FlexColorPicker/Views/PaletteAwareScrollView.swift b/FlexColorPicker/Classes/Views/PaletteAwareScrollView.swift similarity index 100% rename from FlexColorPicker/FlexColorPicker/Views/PaletteAwareScrollView.swift rename to FlexColorPicker/Classes/Views/PaletteAwareScrollView.swift diff --git a/FlexColorPicker/FlexColorPicker/Views/UIViewWithCommonInit.swift b/FlexColorPicker/Classes/Views/UIViewWithCommonInit.swift similarity index 100% rename from FlexColorPicker/FlexColorPicker/Views/UIViewWithCommonInit.swift rename to FlexColorPicker/Classes/Views/UIViewWithCommonInit.swift diff --git a/FlexColorPicker/FlexColorPicker.xcodeproj/project.pbxproj b/FlexColorPicker/FlexColorPicker.xcodeproj/project.pbxproj index f666005..16599ad 100644 --- a/FlexColorPicker/FlexColorPicker.xcodeproj/project.pbxproj +++ b/FlexColorPicker/FlexColorPicker.xcodeproj/project.pbxproj @@ -65,7 +65,7 @@ 3034757020BC7EE500028A15 /* ColorControl.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ColorControl.swift; sourceTree = ""; }; 3034757220BC81CC00028A15 /* ColorSliderDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ColorSliderDelegate.swift; sourceTree = ""; }; 3034757620BC8D1300028A15 /* ControlWithThumbView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ControlWithThumbView.swift; sourceTree = ""; }; - 3034757820BC9DBB00028A15 /* ColorPickerController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = ColorPickerController.swift; path = ../../FlexColorPickerDemo/FlexColorPickerDemo/ColorPickerController.swift; sourceTree = ""; }; + 3034757820BC9DBB00028A15 /* ColorPickerController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ColorPickerController.swift; sourceTree = ""; }; 303ECED420C4A201005BB029 /* ColorPickerDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ColorPickerDelegate.swift; sourceTree = ""; }; 3049576E20C1B19800CEC32F /* ColorPreviewWithHex.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ColorPreviewWithHex.swift; sourceTree = ""; }; 305A234F20BB179000271A59 /* CustomColorPickerViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CustomColorPickerViewController.swift; sourceTree = ""; }; @@ -94,7 +94,8 @@ 3004B91520BB055100A0F93B = { isa = PBXGroup; children = ( - 3004B92120BB055100A0F93B /* FlexColorPicker */, + 3004B92120BB055100A0F93B /* Classes */, + 3071788E20CBDF94001D886E /* Assets */, 3004B92020BB055100A0F93B /* Products */, ); sourceTree = ""; @@ -107,7 +108,7 @@ name = Products; sourceTree = ""; }; - 3004B92120BB055100A0F93B /* FlexColorPicker */ = { + 3004B92120BB055100A0F93B /* Classes */ = { isa = PBXGroup; children = ( 303ECED420C4A201005BB029 /* ColorPickerDelegate.swift */, @@ -122,9 +123,8 @@ 3034756320BC0C7300028A15 /* Utilities */, 3004B92220BB055100A0F93B /* FlexColorPicker.h */, 3004B92320BB055100A0F93B /* Info.plist */, - 3034755A20BC072800028A15 /* Colors.xcassets */, ); - path = FlexColorPicker; + path = Classes; sourceTree = ""; }; 3034755C20BC0BD600028A15 /* Views */ = { @@ -180,6 +180,14 @@ path = Utilities; sourceTree = ""; }; + 3071788E20CBDF94001D886E /* Assets */ = { + isa = PBXGroup; + children = ( + 3034755A20BC072800028A15 /* Colors.xcassets */, + ); + path = Assets; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ @@ -428,7 +436,7 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = FlexColorPicker/Info.plist; + INFOPLIST_FILE = "$(SRCROOT)/Classes/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 11.0; LD_RUNPATH_SEARCH_PATHS = ( @@ -456,7 +464,7 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = FlexColorPicker/Info.plist; + INFOPLIST_FILE = "$(SRCROOT)/Classes/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 11.0; LD_RUNPATH_SEARCH_PATHS = ( diff --git a/FlexColorPickerDemo/FlexColorPickerDemo/AppDelegate.swift b/FlexColorPickerDemo/Classes/AppDelegate.swift similarity index 100% rename from FlexColorPickerDemo/FlexColorPickerDemo/AppDelegate.swift rename to FlexColorPickerDemo/Classes/AppDelegate.swift diff --git a/FlexColorPickerDemo/FlexColorPickerDemo/Assets.xcassets/AppIcon.appiconset/Contents.json b/FlexColorPickerDemo/Classes/Assets.xcassets/AppIcon.appiconset/Contents.json similarity index 100% rename from FlexColorPickerDemo/FlexColorPickerDemo/Assets.xcassets/AppIcon.appiconset/Contents.json rename to FlexColorPickerDemo/Classes/Assets.xcassets/AppIcon.appiconset/Contents.json diff --git a/FlexColorPickerDemo/FlexColorPickerDemo/Assets.xcassets/Contents.json b/FlexColorPickerDemo/Classes/Assets.xcassets/Contents.json similarity index 100% rename from FlexColorPickerDemo/FlexColorPickerDemo/Assets.xcassets/Contents.json rename to FlexColorPickerDemo/Classes/Assets.xcassets/Contents.json diff --git a/FlexColorPickerDemo/FlexColorPickerDemo/Base.lproj/LaunchScreen.storyboard b/FlexColorPickerDemo/Classes/Base.lproj/LaunchScreen.storyboard similarity index 100% rename from FlexColorPickerDemo/FlexColorPickerDemo/Base.lproj/LaunchScreen.storyboard rename to FlexColorPickerDemo/Classes/Base.lproj/LaunchScreen.storyboard diff --git a/FlexColorPickerDemo/FlexColorPickerDemo/CustomControls/HueColorSliderDelegate.swift b/FlexColorPickerDemo/Classes/CustomControls/HueColorSliderDelegate.swift similarity index 100% rename from FlexColorPickerDemo/FlexColorPickerDemo/CustomControls/HueColorSliderDelegate.swift rename to FlexColorPickerDemo/Classes/CustomControls/HueColorSliderDelegate.swift diff --git a/FlexColorPickerDemo/FlexColorPickerDemo/CustomControls/RadialHueColorPaletteDelegate.swift b/FlexColorPickerDemo/Classes/CustomControls/RadialHueColorPaletteDelegate.swift similarity index 100% rename from FlexColorPickerDemo/FlexColorPickerDemo/CustomControls/RadialHueColorPaletteDelegate.swift rename to FlexColorPickerDemo/Classes/CustomControls/RadialHueColorPaletteDelegate.swift diff --git a/FlexColorPickerDemo/FlexColorPickerDemo/CustomControls/RadialHuePalette.swift b/FlexColorPickerDemo/Classes/CustomControls/RadialHuePalette.swift similarity index 100% rename from FlexColorPickerDemo/FlexColorPickerDemo/CustomControls/RadialHuePalette.swift rename to FlexColorPickerDemo/Classes/CustomControls/RadialHuePalette.swift diff --git a/FlexColorPickerDemo/FlexColorPickerDemo/CustomControls/UISliderColorControl.swift b/FlexColorPickerDemo/Classes/CustomControls/UISliderColorControl.swift similarity index 100% rename from FlexColorPickerDemo/FlexColorPickerDemo/CustomControls/UISliderColorControl.swift rename to FlexColorPickerDemo/Classes/CustomControls/UISliderColorControl.swift diff --git a/FlexColorPickerDemo/FlexColorPickerDemo/CustomControlsDemoViewController.swift b/FlexColorPickerDemo/Classes/CustomControlsDemoViewController.swift similarity index 100% rename from FlexColorPickerDemo/FlexColorPickerDemo/CustomControlsDemoViewController.swift rename to FlexColorPickerDemo/Classes/CustomControlsDemoViewController.swift diff --git a/FlexColorPickerDemo/FlexColorPickerDemo/DemoRootViewController.swift b/FlexColorPickerDemo/Classes/DemoRootViewController.swift similarity index 100% rename from FlexColorPickerDemo/FlexColorPickerDemo/DemoRootViewController.swift rename to FlexColorPickerDemo/Classes/DemoRootViewController.swift diff --git a/FlexColorPickerDemo/FlexColorPickerDemo/Info.plist b/FlexColorPickerDemo/Classes/Info.plist similarity index 100% rename from FlexColorPickerDemo/FlexColorPickerDemo/Info.plist rename to FlexColorPickerDemo/Classes/Info.plist diff --git a/FlexColorPickerDemo/FlexColorPickerDemo/Main.storyboard b/FlexColorPickerDemo/Classes/Main.storyboard similarity index 100% rename from FlexColorPickerDemo/FlexColorPickerDemo/Main.storyboard rename to FlexColorPickerDemo/Classes/Main.storyboard diff --git a/FlexColorPickerDemo/FlexColorPickerDemo/ModalDemoViewController.swift b/FlexColorPickerDemo/Classes/ModalDemoViewController.swift similarity index 100% rename from FlexColorPickerDemo/FlexColorPickerDemo/ModalDemoViewController.swift rename to FlexColorPickerDemo/Classes/ModalDemoViewController.swift diff --git a/FlexColorPickerDemo/FlexColorPickerDemo/PickerInTableDemoViewController.swift b/FlexColorPickerDemo/Classes/PickerInTableDemoViewController.swift similarity index 100% rename from FlexColorPickerDemo/FlexColorPickerDemo/PickerInTableDemoViewController.swift rename to FlexColorPickerDemo/Classes/PickerInTableDemoViewController.swift diff --git a/FlexColorPickerDemo/FlexColorPickerDemo.xcodeproj/project.pbxproj b/FlexColorPickerDemo/FlexColorPickerDemo.xcodeproj/project.pbxproj index 5989ef7..1a6e416 100644 --- a/FlexColorPickerDemo/FlexColorPickerDemo.xcodeproj/project.pbxproj +++ b/FlexColorPickerDemo/FlexColorPickerDemo.xcodeproj/project.pbxproj @@ -71,12 +71,12 @@ isa = PBXGroup; children = ( 305A238D20BB512E00271A59 /* FlexColorPicker.framework */, - 305A236820BB4F7700271A59 /* FlexColorPickerDemo */, + 305A236820BB4F7700271A59 /* Classes */, 305A238620BB50EB00271A59 /* FlexColorPickerDemo.app */, ); sourceTree = ""; }; - 305A236820BB4F7700271A59 /* FlexColorPickerDemo */ = { + 305A236820BB4F7700271A59 /* Classes */ = { isa = PBXGroup; children = ( 305A236920BB4F7700271A59 /* AppDelegate.swift */, @@ -90,7 +90,7 @@ 305A237420BB4F7800271A59 /* LaunchScreen.storyboard */, 305A237720BB4F7800271A59 /* Info.plist */, ); - path = FlexColorPickerDemo; + path = Classes; sourceTree = ""; }; 30FE28DE20CB0F3800D0063E /* CustomControls */ = { @@ -322,7 +322,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_STYLE = Automatic; DEVELOPMENT_TEAM = UWF3VQ79QJ; - INFOPLIST_FILE = FlexColorPickerDemo/Info.plist; + INFOPLIST_FILE = "$(SRCROOT)/Classes/Info.plist"; IPHONEOS_DEPLOYMENT_TARGET = 11.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", @@ -341,7 +341,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_STYLE = Automatic; DEVELOPMENT_TEAM = UWF3VQ79QJ; - INFOPLIST_FILE = FlexColorPickerDemo/Info.plist; + INFOPLIST_FILE = "$(SRCROOT)/Classes/Info.plist"; IPHONEOS_DEPLOYMENT_TARGET = 11.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", diff --git a/Flex_color_picker_for_swift_preview1.gif b/Flex_color_picker_for_swift_preview1.gif deleted file mode 100644 index 9202532..0000000 Binary files a/Flex_color_picker_for_swift_preview1.gif and /dev/null differ diff --git a/README.md b/README.md index 78d1775..3edfca3 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,9 @@ # Flex Color Picker -Modern & flexible iOS HSB Color picker component written in Swift 4. Great UX, high performance and open, protocol oriented design: You can set, override or replace almost anything. +Modern & flexible Color picker component for iOS written in Swift 4. Great UX, high performance and open, protocol oriented design: You can set, override or replace almost anything. ![Demo CountPages alpha](https://github.com/RastislavMirek/FlexColorPicker/blob/master/SampleGifs/Flex_color_picker_for_swift_preview1.gif) ![Demo CountPages alpha](https://github.com/RastislavMirek/FlexColorPicker/blob/master/SampleGifs/Flex_color_picker_for_swift_preview2.gif) +![Demo CountPages alpha](https://github.com/RastislavMirek/FlexColorPicker/blob/master/SampleGifs/Flex_color_picker_for_swift_preview3.gif) ## Use cases supported 1. ready-to-use color picker that works great out-of-box @@ -22,7 +23,6 @@ Modern & flexible iOS HSB Color picker component written in Swift 4. Great U - or reuse existing slider/palete for different color model by implementing another protocol - all key classes are opened & ready for extending with many override points -![Demo CountPages alpha](https://github.com/RastislavMirek/FlexColorPicker/blob/master/SampleGifs/Flex_color_picker_for_swift_preview3.gif) ![Demo CountPages alpha](https://github.com/RastislavMirek/FlexColorPicker/blob/master/SampleGifs/Flex_color_picker_for_swift_preview4.gif) ## Instalation @@ -55,9 +55,9 @@ When setting up slider controls in storyboard it is a good practise to set its b Color preview component (the one that shows hex of color by default) can be tapped. When it it tapped color picker controller sends selected confirmed call to its delegate. You can comunicate this feature to your users or opt out by disabling it setting `ColorPreviewWithHex.tapToConfirm` to `false`. ## Getting in Touch -If you like it, have a question or want to hire iOS developers shoot me a message at [my first name, see profile] at [epytysae spelled backwards] dot [first 4 letters of word information]. Email will goes directly to author FlexColorPicker, cryptic emial format is just spam bot protection. +If you like it, have a question or want to hire iOS developers shoot me a message at [my first name, see profile] at [epytysae spelled backwards] dot [first 4 letters of word information]. Email will goes directly to author FlexColorPicker, cryptic email format is just spam bot protection. Suggestions, feedback, bug reorts & pull requests are very wellcomed. -Thanks +### Thanks Visual of slider control inspired by popular Objective-C library HRColorPicker. Thank you for using FlexColorPicker! If you just have 5 seconds to give back, please star this repository. diff --git a/Screenshots/All_Flex_Colop_Picker_Controls_showcase.png b/Screenshots/All_Flex_Colop_Picker_Controls_showcase.png new file mode 100755 index 0000000..84655da Binary files /dev/null and b/Screenshots/All_Flex_Colop_Picker_Controls_showcase.png differ diff --git a/Screenshots/Custom_Color_Picker_Components.png b/Screenshots/Custom_Color_Picker_Components.png new file mode 100755 index 0000000..83c6152 Binary files /dev/null and b/Screenshots/Custom_Color_Picker_Components.png differ diff --git a/Screenshots/Default_Flex_Color_Picker.png b/Screenshots/Default_Flex_Color_Picker.png new file mode 100755 index 0000000..bfc5dc9 Binary files /dev/null and b/Screenshots/Default_Flex_Color_Picker.png differ diff --git a/Screenshots/Rectangular_Color_Picker_Palette.png b/Screenshots/Rectangular_Color_Picker_Palette.png new file mode 100755 index 0000000..0a099ba Binary files /dev/null and b/Screenshots/Rectangular_Color_Picker_Palette.png differ