Skip to content

Commit

Permalink
Renamed source folders
Browse files Browse the repository at this point in the history
Added podspecs
Added screenshots
  • Loading branch information
RastislavMirek committed Jun 9, 2018
1 parent f43e36f commit d866dfc
Show file tree
Hide file tree
Showing 63 changed files with 99 additions and 16 deletions.
43 changes: 43 additions & 0 deletions FlexColorPicker.podspec
Original file line number Diff line number Diff line change
@@ -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' => '[email protected]' }
s.source = { :git => 'https://github.com/RastislavMirek/FlexColorPicker.git', :tag => s.version.to_s }
# s.social_media_url = 'https://twitter.com/<TWITTER_USERNAME>'

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
19 changes: 19 additions & 0 deletions FlexColorPicker.xcworkspace/contents.xcworkspacedata

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
22 changes: 15 additions & 7 deletions FlexColorPicker/FlexColorPicker.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
3034757020BC7EE500028A15 /* ColorControl.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ColorControl.swift; sourceTree = "<group>"; };
3034757220BC81CC00028A15 /* ColorSliderDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ColorSliderDelegate.swift; sourceTree = "<group>"; };
3034757620BC8D1300028A15 /* ControlWithThumbView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ControlWithThumbView.swift; sourceTree = "<group>"; };
3034757820BC9DBB00028A15 /* ColorPickerController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = ColorPickerController.swift; path = ../../FlexColorPickerDemo/FlexColorPickerDemo/ColorPickerController.swift; sourceTree = "<group>"; };
3034757820BC9DBB00028A15 /* ColorPickerController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ColorPickerController.swift; sourceTree = "<group>"; };
303ECED420C4A201005BB029 /* ColorPickerDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ColorPickerDelegate.swift; sourceTree = "<group>"; };
3049576E20C1B19800CEC32F /* ColorPreviewWithHex.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ColorPreviewWithHex.swift; sourceTree = "<group>"; };
305A234F20BB179000271A59 /* CustomColorPickerViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CustomColorPickerViewController.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -94,7 +94,8 @@
3004B91520BB055100A0F93B = {
isa = PBXGroup;
children = (
3004B92120BB055100A0F93B /* FlexColorPicker */,
3004B92120BB055100A0F93B /* Classes */,
3071788E20CBDF94001D886E /* Assets */,
3004B92020BB055100A0F93B /* Products */,
);
sourceTree = "<group>";
Expand All @@ -107,7 +108,7 @@
name = Products;
sourceTree = "<group>";
};
3004B92120BB055100A0F93B /* FlexColorPicker */ = {
3004B92120BB055100A0F93B /* Classes */ = {
isa = PBXGroup;
children = (
303ECED420C4A201005BB029 /* ColorPickerDelegate.swift */,
Expand All @@ -122,9 +123,8 @@
3034756320BC0C7300028A15 /* Utilities */,
3004B92220BB055100A0F93B /* FlexColorPicker.h */,
3004B92320BB055100A0F93B /* Info.plist */,
3034755A20BC072800028A15 /* Colors.xcassets */,
);
path = FlexColorPicker;
path = Classes;
sourceTree = "<group>";
};
3034755C20BC0BD600028A15 /* Views */ = {
Expand Down Expand Up @@ -180,6 +180,14 @@
path = Utilities;
sourceTree = "<group>";
};
3071788E20CBDF94001D886E /* Assets */ = {
isa = PBXGroup;
children = (
3034755A20BC072800028A15 /* Colors.xcassets */,
);
path = Assets;
sourceTree = "<group>";
};
/* End PBXGroup section */

/* Begin PBXHeadersBuildPhase section */
Expand Down Expand Up @@ -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 = (
Expand Down Expand Up @@ -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 = (
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,12 @@
isa = PBXGroup;
children = (
305A238D20BB512E00271A59 /* FlexColorPicker.framework */,
305A236820BB4F7700271A59 /* FlexColorPickerDemo */,
305A236820BB4F7700271A59 /* Classes */,
305A238620BB50EB00271A59 /* FlexColorPickerDemo.app */,
);
sourceTree = "<group>";
};
305A236820BB4F7700271A59 /* FlexColorPickerDemo */ = {
305A236820BB4F7700271A59 /* Classes */ = {
isa = PBXGroup;
children = (
305A236920BB4F7700271A59 /* AppDelegate.swift */,
Expand All @@ -90,7 +90,7 @@
305A237420BB4F7800271A59 /* LaunchScreen.storyboard */,
305A237720BB4F7800271A59 /* Info.plist */,
);
path = FlexColorPickerDemo;
path = Classes;
sourceTree = "<group>";
};
30FE28DE20CB0F3800D0063E /* CustomControls */ = {
Expand Down Expand Up @@ -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)",
Expand All @@ -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)",
Expand Down
Binary file removed Flex_color_picker_for_swift_preview1.gif
Binary file not shown.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# Flex Color Picker
Modern &amp; 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 &amp; 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
Expand All @@ -22,7 +23,6 @@ Modern &amp; 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 &amp 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
Expand Down Expand Up @@ -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.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Screenshots/Custom_Color_Picker_Components.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Screenshots/Default_Flex_Color_Picker.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Screenshots/Rectangular_Color_Picker_Palette.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit d866dfc

Please sign in to comment.