From f27bd73f8dac95a04250387a91119634b64bdc2a Mon Sep 17 00:00:00 2001 From: Kevin Li Date: Sun, 2 Aug 2020 18:59:24 -0700 Subject: [PATCH] Feature/cocoapods (#7) * Update README.md * added xcodeproj and podspec * modified specs and validation is proper now * updated version of pod --- ElegantColorPalette.podspec | 22 + ElegantColorPalette.xcodeproj/project.pbxproj | 414 ++++++++++++++++++ .../contents.xcworkspacedata | 7 + .../xcshareddata/IDEWorkspaceChecks.plist | 8 + .../xcshareddata/WorkspaceSettings.xcsettings | 8 + .../ElegantColorPalette-Package.xcscheme | 58 +++ README.md | 13 +- Sources/ElegantColorPalette/Info.plist | 26 ++ 8 files changed, 551 insertions(+), 5 deletions(-) create mode 100644 ElegantColorPalette.podspec create mode 100644 ElegantColorPalette.xcodeproj/project.pbxproj create mode 100644 ElegantColorPalette.xcodeproj/project.xcworkspace/contents.xcworkspacedata create mode 100644 ElegantColorPalette.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist create mode 100644 ElegantColorPalette.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings create mode 100644 ElegantColorPalette.xcodeproj/xcshareddata/xcschemes/ElegantColorPalette-Package.xcscheme create mode 100644 Sources/ElegantColorPalette/Info.plist diff --git a/ElegantColorPalette.podspec b/ElegantColorPalette.podspec new file mode 100644 index 0000000..6cc30a4 --- /dev/null +++ b/ElegantColorPalette.podspec @@ -0,0 +1,22 @@ +Pod::Spec.new do |s| + s.name = 'ElegantColorPalette' + s.version = '1.0.0' + s.summary = 'The elegant color picker missed in UIKit and SwiftUI' + + s.description = <<-DESC +`ElegantColorPalette` is inspired by [TimePage](https://us.moleskine.com/timepage/p0486) and is part of a larger repository of elegant demonstrations like this: [TimePage Clone](https://github.com/ThasianX/TimePage-Clone). + +The top level view is an `SKView` that presents an `SKScene` of colors nodes. The color nodes are `SKShapeNode` subclasses. When using this library, you are only interacting with the `SKView`: all you have to do is configure the size of the view either through autolayout or size constraints and the view does the rest. + DESC + + s.homepage = 'https://github.com/ThasianX/ElegantColorPalette' + s.license = { :type => 'MIT', :file => 'LICENSE' } + s.author = { 'Kevin Li' => 'kevinli29033@gmail.com' } + s.source = { :git => 'https://github.com/ThasianX/ElegantColorPalette.git', :tag => s.version.to_s } + + s.ios.deployment_target = '13.0' + s.swift_version = '5.1' + + s.source_files = 'Sources/**/*.swift' + +end diff --git a/ElegantColorPalette.xcodeproj/project.pbxproj b/ElegantColorPalette.xcodeproj/project.pbxproj new file mode 100644 index 0000000..1171d05 --- /dev/null +++ b/ElegantColorPalette.xcodeproj/project.pbxproj @@ -0,0 +1,414 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + OBJ_52 /* ColorPaletteBindingView.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_9 /* ColorPaletteBindingView.swift */; }; + OBJ_53 /* ColorPaletteView.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_10 /* ColorPaletteView.swift */; }; + OBJ_54 /* CGVector+Additions.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_13 /* CGVector+Additions.swift */; }; + OBJ_55 /* CGVector+Operators.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_14 /* CGVector+Operators.swift */; }; + OBJ_56 /* ColorNode+Modifiers.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_15 /* ColorNode+Modifiers.swift */; }; + OBJ_57 /* Comparable+Clamped.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_16 /* Comparable+Clamped.swift */; }; + OBJ_58 /* UIColor+Color.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_17 /* UIColor+Color.swift */; }; + OBJ_59 /* ColorPaletteManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_19 /* ColorPaletteManager.swift */; }; + OBJ_60 /* DefaultNodeStyle.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_20 /* DefaultNodeStyle.swift */; }; + OBJ_61 /* NodeStyleConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_21 /* NodeStyleConfiguration.swift */; }; + OBJ_62 /* PaletteColor.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_22 /* PaletteColor.swift */; }; + OBJ_63 /* FocusModifier.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_24 /* FocusModifier.swift */; }; + OBJ_64 /* FontModifier.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_25 /* FontModifier.swift */; }; + OBJ_65 /* HighlightModifier.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_26 /* HighlightModifier.swift */; }; + OBJ_66 /* RadiusModifier.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_27 /* RadiusModifier.swift */; }; + OBJ_67 /* ScaleFadeModifier.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_28 /* ScaleFadeModifier.swift */; }; + OBJ_68 /* StartUpModifier.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_29 /* StartUpModifier.swift */; }; + OBJ_69 /* Buildable.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_31 /* Buildable.swift */; }; + OBJ_70 /* ColorSchemeObserver.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_32 /* ColorSchemeObserver.swift */; }; + OBJ_71 /* NodeModifier.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_33 /* NodeModifier.swift */; }; + OBJ_72 /* NodeStyle.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_34 /* NodeStyle.swift */; }; + OBJ_73 /* ColorNode.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_36 /* ColorNode.swift */; }; + OBJ_74 /* ColorPaletteScene.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_37 /* ColorPaletteScene.swift */; }; + OBJ_75 /* ColorsContainerNode.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_38 /* ColorsContainerNode.swift */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 1E6E997D24D782220091D220 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + "ElegantColorPalette::ElegantColorPalette::Product" /* ElegantColorPalette.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = ElegantColorPalette.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + OBJ_10 /* ColorPaletteView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ColorPaletteView.swift; sourceTree = ""; }; + OBJ_13 /* CGVector+Additions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "CGVector+Additions.swift"; sourceTree = ""; }; + OBJ_14 /* CGVector+Operators.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "CGVector+Operators.swift"; sourceTree = ""; }; + OBJ_15 /* ColorNode+Modifiers.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "ColorNode+Modifiers.swift"; sourceTree = ""; }; + OBJ_16 /* Comparable+Clamped.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Comparable+Clamped.swift"; sourceTree = ""; }; + OBJ_17 /* UIColor+Color.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIColor+Color.swift"; sourceTree = ""; }; + OBJ_19 /* ColorPaletteManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ColorPaletteManager.swift; sourceTree = ""; }; + OBJ_20 /* DefaultNodeStyle.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DefaultNodeStyle.swift; sourceTree = ""; }; + OBJ_21 /* NodeStyleConfiguration.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NodeStyleConfiguration.swift; sourceTree = ""; }; + OBJ_22 /* PaletteColor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PaletteColor.swift; sourceTree = ""; }; + OBJ_24 /* FocusModifier.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FocusModifier.swift; sourceTree = ""; }; + OBJ_25 /* FontModifier.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FontModifier.swift; sourceTree = ""; }; + OBJ_26 /* HighlightModifier.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HighlightModifier.swift; sourceTree = ""; }; + OBJ_27 /* RadiusModifier.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RadiusModifier.swift; sourceTree = ""; }; + OBJ_28 /* ScaleFadeModifier.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ScaleFadeModifier.swift; sourceTree = ""; }; + OBJ_29 /* StartUpModifier.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StartUpModifier.swift; sourceTree = ""; }; + OBJ_31 /* Buildable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Buildable.swift; sourceTree = ""; }; + OBJ_32 /* ColorSchemeObserver.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ColorSchemeObserver.swift; sourceTree = ""; }; + OBJ_33 /* NodeModifier.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NodeModifier.swift; sourceTree = ""; }; + OBJ_34 /* NodeStyle.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NodeStyle.swift; sourceTree = ""; }; + OBJ_36 /* ColorNode.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ColorNode.swift; sourceTree = ""; }; + OBJ_37 /* ColorPaletteScene.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ColorPaletteScene.swift; sourceTree = ""; }; + OBJ_38 /* ColorsContainerNode.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ColorsContainerNode.swift; sourceTree = ""; }; + OBJ_42 /* UIKitStoryboardExample */ = {isa = PBXFileReference; lastKnownFileType = folder; path = UIKitStoryboardExample; sourceTree = SOURCE_ROOT; }; + OBJ_43 /* SwiftUIExample */ = {isa = PBXFileReference; lastKnownFileType = folder; path = SwiftUIExample; sourceTree = SOURCE_ROOT; }; + OBJ_44 /* UIKitProgrammaticAndXIBExample */ = {isa = PBXFileReference; lastKnownFileType = folder; path = UIKitProgrammaticAndXIBExample; sourceTree = SOURCE_ROOT; }; + OBJ_45 /* LICENSE */ = {isa = PBXFileReference; lastKnownFileType = text; path = LICENSE; sourceTree = ""; }; + OBJ_46 /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = ""; }; + OBJ_6 /* Package.swift */ = {isa = PBXFileReference; explicitFileType = sourcecode.swift; path = Package.swift; sourceTree = ""; }; + OBJ_9 /* ColorPaletteBindingView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ColorPaletteBindingView.swift; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + OBJ_76 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 0; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + OBJ_11 /* Helpers */ = { + isa = PBXGroup; + children = ( + OBJ_12 /* Extensions */, + OBJ_18 /* Models */, + OBJ_23 /* Modifiers */, + OBJ_30 /* Protocols */, + ); + path = Helpers; + sourceTree = ""; + }; + OBJ_12 /* Extensions */ = { + isa = PBXGroup; + children = ( + OBJ_13 /* CGVector+Additions.swift */, + OBJ_14 /* CGVector+Operators.swift */, + OBJ_15 /* ColorNode+Modifiers.swift */, + OBJ_16 /* Comparable+Clamped.swift */, + OBJ_17 /* UIColor+Color.swift */, + ); + path = Extensions; + sourceTree = ""; + }; + OBJ_18 /* Models */ = { + isa = PBXGroup; + children = ( + OBJ_19 /* ColorPaletteManager.swift */, + OBJ_20 /* DefaultNodeStyle.swift */, + OBJ_21 /* NodeStyleConfiguration.swift */, + OBJ_22 /* PaletteColor.swift */, + ); + path = Models; + sourceTree = ""; + }; + OBJ_23 /* Modifiers */ = { + isa = PBXGroup; + children = ( + OBJ_24 /* FocusModifier.swift */, + OBJ_25 /* FontModifier.swift */, + OBJ_26 /* HighlightModifier.swift */, + OBJ_27 /* RadiusModifier.swift */, + OBJ_28 /* ScaleFadeModifier.swift */, + OBJ_29 /* StartUpModifier.swift */, + ); + path = Modifiers; + sourceTree = ""; + }; + OBJ_30 /* Protocols */ = { + isa = PBXGroup; + children = ( + OBJ_31 /* Buildable.swift */, + OBJ_32 /* ColorSchemeObserver.swift */, + OBJ_33 /* NodeModifier.swift */, + OBJ_34 /* NodeStyle.swift */, + ); + path = Protocols; + sourceTree = ""; + }; + OBJ_35 /* Views */ = { + isa = PBXGroup; + children = ( + OBJ_36 /* ColorNode.swift */, + OBJ_37 /* ColorPaletteScene.swift */, + OBJ_38 /* ColorsContainerNode.swift */, + ); + path = Views; + sourceTree = ""; + }; + OBJ_39 /* Tests */ = { + isa = PBXGroup; + children = ( + ); + name = Tests; + sourceTree = SOURCE_ROOT; + }; + OBJ_40 /* Products */ = { + isa = PBXGroup; + children = ( + "ElegantColorPalette::ElegantColorPalette::Product" /* ElegantColorPalette.framework */, + ); + name = Products; + sourceTree = BUILT_PRODUCTS_DIR; + }; + OBJ_5 = { + isa = PBXGroup; + children = ( + OBJ_6 /* Package.swift */, + OBJ_7 /* Sources */, + OBJ_39 /* Tests */, + OBJ_40 /* Products */, + OBJ_42 /* UIKitStoryboardExample */, + OBJ_43 /* SwiftUIExample */, + OBJ_44 /* UIKitProgrammaticAndXIBExample */, + OBJ_45 /* LICENSE */, + OBJ_46 /* README.md */, + ); + sourceTree = ""; + }; + OBJ_7 /* Sources */ = { + isa = PBXGroup; + children = ( + OBJ_8 /* ElegantColorPalette */, + ); + name = Sources; + sourceTree = SOURCE_ROOT; + }; + OBJ_8 /* ElegantColorPalette */ = { + isa = PBXGroup; + children = ( + OBJ_9 /* ColorPaletteBindingView.swift */, + OBJ_10 /* ColorPaletteView.swift */, + 1E6E997D24D782220091D220 /* Info.plist */, + OBJ_11 /* Helpers */, + OBJ_35 /* Views */, + ); + name = ElegantColorPalette; + path = Sources/ElegantColorPalette; + sourceTree = SOURCE_ROOT; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + "ElegantColorPalette::ElegantColorPalette" /* ElegantColorPalette */ = { + isa = PBXNativeTarget; + buildConfigurationList = OBJ_48 /* Build configuration list for PBXNativeTarget "ElegantColorPalette" */; + buildPhases = ( + OBJ_51 /* Sources */, + OBJ_76 /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = ElegantColorPalette; + productName = ElegantColorPalette; + productReference = "ElegantColorPalette::ElegantColorPalette::Product" /* ElegantColorPalette.framework */; + productType = "com.apple.product-type.framework"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + OBJ_1 /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftMigration = 9999; + LastUpgradeCheck = 9999; + }; + buildConfigurationList = OBJ_2 /* Build configuration list for PBXProject "ElegantColorPalette" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + ); + mainGroup = OBJ_5; + productRefGroup = OBJ_40 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + "ElegantColorPalette::ElegantColorPalette" /* ElegantColorPalette */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXSourcesBuildPhase section */ + OBJ_51 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 0; + files = ( + OBJ_52 /* ColorPaletteBindingView.swift in Sources */, + OBJ_53 /* ColorPaletteView.swift in Sources */, + OBJ_54 /* CGVector+Additions.swift in Sources */, + OBJ_55 /* CGVector+Operators.swift in Sources */, + OBJ_56 /* ColorNode+Modifiers.swift in Sources */, + OBJ_57 /* Comparable+Clamped.swift in Sources */, + OBJ_58 /* UIColor+Color.swift in Sources */, + OBJ_59 /* ColorPaletteManager.swift in Sources */, + OBJ_60 /* DefaultNodeStyle.swift in Sources */, + OBJ_61 /* NodeStyleConfiguration.swift in Sources */, + OBJ_62 /* PaletteColor.swift in Sources */, + OBJ_63 /* FocusModifier.swift in Sources */, + OBJ_64 /* FontModifier.swift in Sources */, + OBJ_65 /* HighlightModifier.swift in Sources */, + OBJ_66 /* RadiusModifier.swift in Sources */, + OBJ_67 /* ScaleFadeModifier.swift in Sources */, + OBJ_68 /* StartUpModifier.swift in Sources */, + OBJ_69 /* Buildable.swift in Sources */, + OBJ_70 /* ColorSchemeObserver.swift in Sources */, + OBJ_71 /* NodeModifier.swift in Sources */, + OBJ_72 /* NodeStyle.swift in Sources */, + OBJ_73 /* ColorNode.swift in Sources */, + OBJ_74 /* ColorPaletteScene.swift in Sources */, + OBJ_75 /* ColorsContainerNode.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + OBJ_3 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ENABLE_OBJC_ARC = YES; + COMBINE_HIDPI_IMAGES = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_NS_ASSERTIONS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "$(inherited)", + "SWIFT_PACKAGE=1", + "DEBUG=1", + ); + MACOSX_DEPLOYMENT_TARGET = 10.10; + ONLY_ACTIVE_ARCH = YES; + OTHER_SWIFT_FLAGS = "$(inherited) -DXcode"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = macosx; + SUPPORTED_PLATFORMS = "macosx iphoneos iphonesimulator appletvos appletvsimulator watchos watchsimulator"; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) SWIFT_PACKAGE DEBUG"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + USE_HEADERMAP = NO; + }; + name = Debug; + }; + OBJ_4 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ENABLE_OBJC_ARC = YES; + COMBINE_HIDPI_IMAGES = YES; + COPY_PHASE_STRIP = YES; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + GCC_OPTIMIZATION_LEVEL = s; + GCC_PREPROCESSOR_DEFINITIONS = ( + "$(inherited)", + "SWIFT_PACKAGE=1", + ); + MACOSX_DEPLOYMENT_TARGET = 10.10; + OTHER_SWIFT_FLAGS = "$(inherited) -DXcode"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = macosx; + SUPPORTED_PLATFORMS = "macosx iphoneos iphonesimulator appletvos appletvsimulator watchos watchsimulator"; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) SWIFT_PACKAGE"; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + USE_HEADERMAP = NO; + }; + name = Release; + }; + OBJ_49 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + APPLICATION_EXTENSION_API_ONLY = YES; + ENABLE_TESTABILITY = YES; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PLATFORM_DIR)/Developer/Library/Frameworks", + ); + HEADER_SEARCH_PATHS = "$(inherited)"; + INFOPLIST_FILE = "$(SRCROOT)/Sources/ElegantColorPalette/Info.plist"; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) $(TOOLCHAIN_DIR)/usr/lib/swift/macosx"; + MARKETING_VERSION = 1.0.0; + OTHER_CFLAGS = "$(inherited)"; + OTHER_LDFLAGS = "$(inherited)"; + OTHER_SWIFT_FLAGS = "$(inherited)"; + PRODUCT_BUNDLE_IDENTIFIER = ElegantColorPalette; + PRODUCT_MODULE_NAME = "$(TARGET_NAME:c99extidentifier)"; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited)"; + SWIFT_VERSION = 5.0; + TARGET_NAME = ElegantColorPalette; + TVOS_DEPLOYMENT_TARGET = 9.0; + WATCHOS_DEPLOYMENT_TARGET = 2.0; + }; + name = Debug; + }; + OBJ_50 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + APPLICATION_EXTENSION_API_ONLY = YES; + ENABLE_TESTABILITY = YES; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PLATFORM_DIR)/Developer/Library/Frameworks", + ); + HEADER_SEARCH_PATHS = "$(inherited)"; + INFOPLIST_FILE = "$(SRCROOT)/Sources/ElegantColorPalette/Info.plist"; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) $(TOOLCHAIN_DIR)/usr/lib/swift/macosx"; + MARKETING_VERSION = 1.0.0; + OTHER_CFLAGS = "$(inherited)"; + OTHER_LDFLAGS = "$(inherited)"; + OTHER_SWIFT_FLAGS = "$(inherited)"; + PRODUCT_BUNDLE_IDENTIFIER = ElegantColorPalette; + PRODUCT_MODULE_NAME = "$(TARGET_NAME:c99extidentifier)"; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited)"; + SWIFT_VERSION = 5.0; + TARGET_NAME = ElegantColorPalette; + TVOS_DEPLOYMENT_TARGET = 9.0; + WATCHOS_DEPLOYMENT_TARGET = 2.0; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + OBJ_2 /* Build configuration list for PBXProject "ElegantColorPalette" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + OBJ_3 /* Debug */, + OBJ_4 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + OBJ_48 /* Build configuration list for PBXNativeTarget "ElegantColorPalette" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + OBJ_49 /* Debug */, + OBJ_50 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = OBJ_1 /* Project object */; +} diff --git a/ElegantColorPalette.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/ElegantColorPalette.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..fe1aa71 --- /dev/null +++ b/ElegantColorPalette.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + \ No newline at end of file diff --git a/ElegantColorPalette.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/ElegantColorPalette.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/ElegantColorPalette.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/ElegantColorPalette.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/ElegantColorPalette.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 0000000..a72dc2b --- /dev/null +++ b/ElegantColorPalette.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,8 @@ + + + + + IDEWorkspaceSharedSettings_AutocreateContextsIfNeeded + + + \ No newline at end of file diff --git a/ElegantColorPalette.xcodeproj/xcshareddata/xcschemes/ElegantColorPalette-Package.xcscheme b/ElegantColorPalette.xcodeproj/xcshareddata/xcschemes/ElegantColorPalette-Package.xcscheme new file mode 100644 index 0000000..24b162d --- /dev/null +++ b/ElegantColorPalette.xcodeproj/xcshareddata/xcschemes/ElegantColorPalette-Package.xcscheme @@ -0,0 +1,58 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/README.md b/README.md index 1bf1d99..5c66b4b 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,9 @@ The elegant color picker missed in UIKit and SwiftUI. - + + +This example GIF is from [ElegantTimeline](https://github.com/ThasianX/ElegantTimeline-SwiftUI). For a simpler demonstration, you can look at either of the 3 demo projects in this repository. - [Introduction](#introduction) - [Basic Usage](#basic-usage) @@ -23,6 +25,8 @@ The elegant color picker missed in UIKit and SwiftUI. `ElegantColorPalette` is inspired by [TimePage](https://us.moleskine.com/timepage/p0486) and is part of a larger repository of elegant demonstrations like this: [TimePage Clone](https://github.com/ThasianX/TimePage-Clone). +The top level view is an `SKView` that presents an `SKScene` of colors nodes. The color nodes are `SKShapeNode` subclasses. When using this library, you are only interacting with the `SKView`: all you have to do is configure the size of the view either through autolayout or size constraints and the view does the rest. + ## Basic usage For SwiftUI: @@ -36,7 +40,7 @@ struct ExampleSwiftUIView: View { @State private var selectedColor: PaletteColor = .kiwiGreen var body: some View { - ColorPaletteDynamicView(colors: PaletteColor.allColors, selectedColor: $selectedColor) + ColorPaletteBindingView(selectedColor: $selectedColor, colors: PaletteColor.allColors) } } @@ -94,9 +98,8 @@ struct ExampleUIKitViewController: UIViewController { ... - paletteView.update(withColors: PaletteColor.allColors) - paletteView + .update(withColors: PaletteColor.allColors) .didSelectColor { [unowned self] color in ... } @@ -111,7 +114,7 @@ Documentation coming soon... ## Demos -There are 3 different demos, covering UIKit storyboards, XIBs, programmatic instantiation, and SwiftUI. +There are 3 different demos, covering UIKit storyboards, XIBs and programmatic instantiation, and SwiftUI. ## Installation diff --git a/Sources/ElegantColorPalette/Info.plist b/Sources/ElegantColorPalette/Info.plist new file mode 100644 index 0000000..ca23c84 --- /dev/null +++ b/Sources/ElegantColorPalette/Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + FMWK + CFBundleShortVersionString + $(MARKETING_VERSION) + CFBundleSignature + ???? + CFBundleVersion + $(CURRENT_PROJECT_VERSION) + NSPrincipalClass + + +