diff --git a/.DS_Store b/.DS_Store
new file mode 100644
index 0000000..242e423
Binary files /dev/null and b/.DS_Store differ
diff --git a/Chameleon.xcodeproj/project.pbxproj b/Chameleon.xcodeproj/project.pbxproj
index 40e39ae..8b89c65 100755
--- a/Chameleon.xcodeproj/project.pbxproj
+++ b/Chameleon.xcodeproj/project.pbxproj
@@ -9,6 +9,14 @@
/* Begin PBXBuildFile section */
0C6D34721C07B98400A7BF83 /* Chameleon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 240093F81BB4517400932727 /* Chameleon.framework */; };
0C6D34731C07B98400A7BF83 /* Chameleon.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 240093F81BB4517400932727 /* Chameleon.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
+ 0C8A5DE71D8D4B7D00B71D95 /* KeyboardViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 0C8A5DE61D8D4B7D00B71D95 /* KeyboardViewController.m */; };
+ 0C8A5DEB1D8D4B7D00B71D95 /* ChameleonExtension-ObjC.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = 0C8A5DE31D8D4B7D00B71D95 /* ChameleonExtension-ObjC.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
+ 0C8A5DF21D8D4EB400B71D95 /* UIApplication+CHSharedApplication.h in Headers */ = {isa = PBXBuildFile; fileRef = 0C8A5DF01D8D4EB400B71D95 /* UIApplication+CHSharedApplication.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 0C8A5DF31D8D4EB400B71D95 /* UIApplication+CHSharedApplication.m in Sources */ = {isa = PBXBuildFile; fileRef = 0C8A5DF11D8D4EB400B71D95 /* UIApplication+CHSharedApplication.m */; };
+ 0C8A5DF41D8D545C00B71D95 /* Chameleon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 240093F81BB4517400932727 /* Chameleon.framework */; };
+ 0C8A5DFC1D8D54EF00B71D95 /* KeyboardViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0C8A5DFB1D8D54EF00B71D95 /* KeyboardViewController.swift */; };
+ 0C8A5E001D8D54EF00B71D95 /* ChameleonExtension.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = 0C8A5DF91D8D54EF00B71D95 /* ChameleonExtension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
+ 0C8A5E041D8D54F600B71D95 /* Chameleon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 240093F81BB4517400932727 /* Chameleon.framework */; };
0C8DABA81C07AC3800B28FE2 /* UIAppearance+Swift.m in Sources */ = {isa = PBXBuildFile; fileRef = 0C8DABA61C07AC3800B28FE2 /* UIAppearance+Swift.m */; };
0C8DABAB1C07B00000B28FE2 /* UIImage+ChameleonPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 245935E21BB4D62500C30559 /* UIImage+ChameleonPrivate.h */; settings = {ATTRIBUTES = (Public, ); }; };
0C8DABAC1C07B00800B28FE2 /* UIAppearance+Swift.h in Headers */ = {isa = PBXBuildFile; fileRef = 0C8DABA51C07AC3800B28FE2 /* UIAppearance+Swift.h */; settings = {ATTRIBUTES = (Public, ); }; };
@@ -59,6 +67,20 @@
remoteGlobalIDString = 240093F71BB4517400932727;
remoteInfo = Chameleon;
};
+ 0C8A5DE91D8D4B7D00B71D95 /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 240093EF1BB4517400932727 /* Project object */;
+ proxyType = 1;
+ remoteGlobalIDString = 0C8A5DE21D8D4B7D00B71D95;
+ remoteInfo = "ChameleonExtension-ObjC";
+ };
+ 0C8A5DFE1D8D54EF00B71D95 /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 240093EF1BB4517400932727 /* Project object */;
+ proxyType = 1;
+ remoteGlobalIDString = 0C8A5DF81D8D54EF00B71D95;
+ remoteInfo = ChameleonExtension;
+ };
/* End PBXContainerItemProxy section */
/* Begin PBXCopyFilesBuildPhase section */
@@ -73,9 +95,40 @@
name = "Embed Frameworks";
runOnlyForDeploymentPostprocessing = 0;
};
+ 0C8A5DDE1D8D496B00B71D95 /* Embed App Extensions */ = {
+ isa = PBXCopyFilesBuildPhase;
+ buildActionMask = 2147483647;
+ dstPath = "";
+ dstSubfolderSpec = 13;
+ files = (
+ 0C8A5E001D8D54EF00B71D95 /* ChameleonExtension.appex in Embed App Extensions */,
+ );
+ name = "Embed App Extensions";
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 0C8A5DEF1D8D4B7D00B71D95 /* Embed App Extensions */ = {
+ isa = PBXCopyFilesBuildPhase;
+ buildActionMask = 2147483647;
+ dstPath = "";
+ dstSubfolderSpec = 13;
+ files = (
+ 0C8A5DEB1D8D4B7D00B71D95 /* ChameleonExtension-ObjC.appex in Embed App Extensions */,
+ );
+ name = "Embed App Extensions";
+ runOnlyForDeploymentPostprocessing = 0;
+ };
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
+ 0C8A5DE31D8D4B7D00B71D95 /* ChameleonExtension-ObjC.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = "ChameleonExtension-ObjC.appex"; sourceTree = BUILT_PRODUCTS_DIR; };
+ 0C8A5DE51D8D4B7D00B71D95 /* KeyboardViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = KeyboardViewController.h; sourceTree = ""; };
+ 0C8A5DE61D8D4B7D00B71D95 /* KeyboardViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = KeyboardViewController.m; sourceTree = ""; };
+ 0C8A5DE81D8D4B7D00B71D95 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
+ 0C8A5DF01D8D4EB400B71D95 /* UIApplication+CHSharedApplication.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "UIApplication+CHSharedApplication.h"; path = "Pod/Classes/Objective-C/UIApplication+CHSharedApplication.h"; sourceTree = SOURCE_ROOT; };
+ 0C8A5DF11D8D4EB400B71D95 /* UIApplication+CHSharedApplication.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "UIApplication+CHSharedApplication.m"; path = "Pod/Classes/Objective-C/UIApplication+CHSharedApplication.m"; sourceTree = SOURCE_ROOT; };
+ 0C8A5DF91D8D54EF00B71D95 /* ChameleonExtension.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = ChameleonExtension.appex; sourceTree = BUILT_PRODUCTS_DIR; };
+ 0C8A5DFB1D8D54EF00B71D95 /* KeyboardViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KeyboardViewController.swift; sourceTree = ""; };
+ 0C8A5DFD1D8D54EF00B71D95 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
0C8DABA51C07AC3800B28FE2 /* UIAppearance+Swift.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "UIAppearance+Swift.h"; path = "../Pod/Classes/Objective-C/UIAppearance+Swift.h"; sourceTree = ""; };
0C8DABA61C07AC3800B28FE2 /* UIAppearance+Swift.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "UIAppearance+Swift.m"; path = "../Pod/Classes/Objective-C/UIAppearance+Swift.m"; sourceTree = ""; };
0C8DABB11C07B5EA00B28FE2 /* ChameleonDemo-Objc.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "ChameleonDemo-Objc.app"; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -126,6 +179,22 @@
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
+ 0C8A5DE01D8D4B7D00B71D95 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 0C8A5DF41D8D545C00B71D95 /* Chameleon.framework in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 0C8A5DF61D8D54EF00B71D95 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 0C8A5E041D8D54F600B71D95 /* Chameleon.framework in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
0C8DABAE1C07B5EA00B28FE2 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
@@ -152,6 +221,25 @@
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
+ 0C8A5DE41D8D4B7D00B71D95 /* ChameleonExtension-ObjC */ = {
+ isa = PBXGroup;
+ children = (
+ 0C8A5DE51D8D4B7D00B71D95 /* KeyboardViewController.h */,
+ 0C8A5DE61D8D4B7D00B71D95 /* KeyboardViewController.m */,
+ 0C8A5DE81D8D4B7D00B71D95 /* Info.plist */,
+ );
+ path = "ChameleonExtension-ObjC";
+ sourceTree = "";
+ };
+ 0C8A5DFA1D8D54EF00B71D95 /* ChameleonExtension */ = {
+ isa = PBXGroup;
+ children = (
+ 0C8A5DFB1D8D54EF00B71D95 /* KeyboardViewController.swift */,
+ 0C8A5DFD1D8D54EF00B71D95 /* Info.plist */,
+ );
+ path = ChameleonExtension;
+ sourceTree = "";
+ };
0C8DABB21C07B5EA00B28FE2 /* ChameleonDemo-Objc */ = {
isa = PBXGroup;
children = (
@@ -182,6 +270,8 @@
240093FA1BB4517400932727 /* Chameleon */,
247EB8A81BB61EB3009B4904 /* ChameleonDemo */,
0C8DABB21C07B5EA00B28FE2 /* ChameleonDemo-Objc */,
+ 0C8A5DE41D8D4B7D00B71D95 /* ChameleonExtension-ObjC */,
+ 0C8A5DFA1D8D54EF00B71D95 /* ChameleonExtension */,
240093F91BB4517400932727 /* Products */,
);
sourceTree = "";
@@ -192,6 +282,8 @@
240093F81BB4517400932727 /* Chameleon.framework */,
247EB8A71BB61EB3009B4904 /* ChameleonDemo.app */,
0C8DABB11C07B5EA00B28FE2 /* ChameleonDemo-Objc.app */,
+ 0C8A5DE31D8D4B7D00B71D95 /* ChameleonExtension-ObjC.appex */,
+ 0C8A5DF91D8D54EF00B71D95 /* ChameleonExtension.appex */,
);
name = Products;
sourceTree = "";
@@ -227,6 +319,8 @@
245935EB1BB4D62500C30559 /* UIViewController+Chameleon.m */,
0C8DABA51C07AC3800B28FE2 /* UIAppearance+Swift.h */,
0C8DABA61C07AC3800B28FE2 /* UIAppearance+Swift.m */,
+ 0C8A5DF01D8D4EB400B71D95 /* UIApplication+CHSharedApplication.h */,
+ 0C8A5DF11D8D4EB400B71D95 /* UIApplication+CHSharedApplication.m */,
240093FD1BB4517400932727 /* Info.plist */,
);
path = Chameleon;
@@ -264,6 +358,7 @@
245935F01BB4D62500C30559 /* ChameleonEnums.h in Headers */,
245935EE1BB4D62500C30559 /* ChameleonConstants.h in Headers */,
245935F81BB4D62500C30559 /* UIColor+ChameleonPrivate.h in Headers */,
+ 0C8A5DF21D8D4EB400B71D95 /* UIApplication+CHSharedApplication.h in Headers */,
245936021BB4D62500C30559 /* UIViewController+Chameleon.h in Headers */,
0C8DABAB1C07B00000B28FE2 /* UIImage+ChameleonPrivate.h in Headers */,
0C8DABAC1C07B00800B28FE2 /* UIAppearance+Swift.h in Headers */,
@@ -273,6 +368,40 @@
/* End PBXHeadersBuildPhase section */
/* Begin PBXNativeTarget section */
+ 0C8A5DE21D8D4B7D00B71D95 /* ChameleonExtension-ObjC */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 0C8A5DEC1D8D4B7D00B71D95 /* Build configuration list for PBXNativeTarget "ChameleonExtension-ObjC" */;
+ buildPhases = (
+ 0C8A5DDF1D8D4B7D00B71D95 /* Sources */,
+ 0C8A5DE01D8D4B7D00B71D95 /* Frameworks */,
+ 0C8A5DE11D8D4B7D00B71D95 /* Resources */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = "ChameleonExtension-ObjC";
+ productName = "ChameleonExtension-ObjC";
+ productReference = 0C8A5DE31D8D4B7D00B71D95 /* ChameleonExtension-ObjC.appex */;
+ productType = "com.apple.product-type.app-extension";
+ };
+ 0C8A5DF81D8D54EF00B71D95 /* ChameleonExtension */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 0C8A5E031D8D54EF00B71D95 /* Build configuration list for PBXNativeTarget "ChameleonExtension" */;
+ buildPhases = (
+ 0C8A5DF51D8D54EF00B71D95 /* Sources */,
+ 0C8A5DF61D8D54EF00B71D95 /* Frameworks */,
+ 0C8A5DF71D8D54EF00B71D95 /* Resources */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = ChameleonExtension;
+ productName = ChameleonExtension;
+ productReference = 0C8A5DF91D8D54EF00B71D95 /* ChameleonExtension.appex */;
+ productType = "com.apple.product-type.app-extension";
+ };
0C8DABB01C07B5EA00B28FE2 /* ChameleonDemo-Objc */ = {
isa = PBXNativeTarget;
buildConfigurationList = 0C8DABC51C07B5EA00B28FE2 /* Build configuration list for PBXNativeTarget "ChameleonDemo-Objc" */;
@@ -281,11 +410,13 @@
0C8DABAE1C07B5EA00B28FE2 /* Frameworks */,
0C8DABAF1C07B5EA00B28FE2 /* Resources */,
0C6D34761C07B98400A7BF83 /* Embed Frameworks */,
+ 0C8A5DEF1D8D4B7D00B71D95 /* Embed App Extensions */,
);
buildRules = (
);
dependencies = (
0C6D34751C07B98400A7BF83 /* PBXTargetDependency */,
+ 0C8A5DEA1D8D4B7D00B71D95 /* PBXTargetDependency */,
);
name = "ChameleonDemo-Objc";
productName = "ChameleonDemo-Objc";
@@ -317,10 +448,12 @@
247EB8A31BB61EB3009B4904 /* Sources */,
247EB8A41BB61EB3009B4904 /* Frameworks */,
247EB8A51BB61EB3009B4904 /* Resources */,
+ 0C8A5DDE1D8D496B00B71D95 /* Embed App Extensions */,
);
buildRules = (
);
dependencies = (
+ 0C8A5DFF1D8D54EF00B71D95 /* PBXTargetDependency */,
);
name = ChameleonDemo;
productName = ChameleonDemo;
@@ -333,18 +466,29 @@
240093EF1BB4517400932727 /* Project object */ = {
isa = PBXProject;
attributes = {
- LastSwiftUpdateCheck = 0700;
- LastUpgradeCheck = 0700;
+ LastSwiftUpdateCheck = 0800;
+ LastUpgradeCheck = 0800;
ORGANIZATIONNAME = "Vicc Alexander";
TargetAttributes = {
+ 0C8A5DE21D8D4B7D00B71D95 = {
+ CreatedOnToolsVersion = 8.0;
+ ProvisioningStyle = Automatic;
+ };
+ 0C8A5DF81D8D54EF00B71D95 = {
+ CreatedOnToolsVersion = 8.0;
+ ProvisioningStyle = Automatic;
+ };
0C8DABB01C07B5EA00B28FE2 = {
CreatedOnToolsVersion = 7.1.1;
+ LastSwiftMigration = 0800;
};
240093F71BB4517400932727 = {
CreatedOnToolsVersion = 7.0;
+ LastSwiftMigration = 0800;
};
247EB8A61BB61EB3009B4904 = {
CreatedOnToolsVersion = 7.0;
+ LastSwiftMigration = 0800;
};
};
};
@@ -364,11 +508,27 @@
240093F71BB4517400932727 /* Chameleon */,
247EB8A61BB61EB3009B4904 /* ChameleonDemo */,
0C8DABB01C07B5EA00B28FE2 /* ChameleonDemo-Objc */,
+ 0C8A5DE21D8D4B7D00B71D95 /* ChameleonExtension-ObjC */,
+ 0C8A5DF81D8D54EF00B71D95 /* ChameleonExtension */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
+ 0C8A5DE11D8D4B7D00B71D95 /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 0C8A5DF71D8D54EF00B71D95 /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
0C8DABAF1C07B5EA00B28FE2 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
@@ -399,6 +559,22 @@
/* End PBXResourcesBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
+ 0C8A5DDF1D8D4B7D00B71D95 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 0C8A5DE71D8D4B7D00B71D95 /* KeyboardViewController.m in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 0C8A5DF51D8D54EF00B71D95 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 0C8A5DFC1D8D54EF00B71D95 /* KeyboardViewController.swift in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
0C8DABAD1C07B5EA00B28FE2 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
@@ -414,6 +590,7 @@
buildActionMask = 2147483647;
files = (
245935F91BB4D62500C30559 /* UIColor+ChameleonPrivate.m in Sources */,
+ 0C8A5DF31D8D4EB400B71D95 /* UIApplication+CHSharedApplication.m in Sources */,
245935F51BB4D62500C30559 /* UIButton+Chameleon.m in Sources */,
245935F31BB4D62500C30559 /* NSArray+Chameleon.m in Sources */,
245935FD1BB4D62500C30559 /* UILabel+Chameleon.m in Sources */,
@@ -446,6 +623,16 @@
target = 240093F71BB4517400932727 /* Chameleon */;
targetProxy = 0C6D34741C07B98400A7BF83 /* PBXContainerItemProxy */;
};
+ 0C8A5DEA1D8D4B7D00B71D95 /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ target = 0C8A5DE21D8D4B7D00B71D95 /* ChameleonExtension-ObjC */;
+ targetProxy = 0C8A5DE91D8D4B7D00B71D95 /* PBXContainerItemProxy */;
+ };
+ 0C8A5DFF1D8D54EF00B71D95 /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ target = 0C8A5DF81D8D54EF00B71D95 /* ChameleonExtension */;
+ targetProxy = 0C8A5DFE1D8D54EF00B71D95 /* PBXContainerItemProxy */;
+ };
/* End PBXTargetDependency section */
/* Begin PBXVariantGroup section */
@@ -484,31 +671,96 @@
/* End PBXVariantGroup section */
/* Begin XCBuildConfiguration section */
+ 0C8A5DED1D8D4B7D00B71D95 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ CLANG_ANALYZER_NONNULL = YES;
+ CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
+ CLANG_WARN_SUSPICIOUS_MOVES = YES;
+ INFOPLIST_FILE = "ChameleonExtension-ObjC/Info.plist";
+ IPHONEOS_DEPLOYMENT_TARGET = 10.0;
+ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks";
+ PRODUCT_BUNDLE_IDENTIFIER = "com.viccalexander.ChameleonDemo-Objc.ChameleonExtension-ObjC";
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SKIP_INSTALL = YES;
+ };
+ name = Debug;
+ };
+ 0C8A5DEE1D8D4B7D00B71D95 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ CLANG_ANALYZER_NONNULL = YES;
+ CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
+ CLANG_WARN_SUSPICIOUS_MOVES = YES;
+ INFOPLIST_FILE = "ChameleonExtension-ObjC/Info.plist";
+ IPHONEOS_DEPLOYMENT_TARGET = 10.0;
+ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks";
+ PRODUCT_BUNDLE_IDENTIFIER = "com.viccalexander.ChameleonDemo-Objc.ChameleonExtension-ObjC";
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SKIP_INSTALL = YES;
+ };
+ name = Release;
+ };
+ 0C8A5E011D8D54EF00B71D95 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ CLANG_ANALYZER_NONNULL = YES;
+ CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
+ CLANG_WARN_SUSPICIOUS_MOVES = YES;
+ INFOPLIST_FILE = ChameleonExtension/Info.plist;
+ IPHONEOS_DEPLOYMENT_TARGET = 10.0;
+ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks";
+ PRODUCT_BUNDLE_IDENTIFIER = com.viccalexander.ChameleonDemo.ChameleonExtension;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SKIP_INSTALL = YES;
+ SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
+ SWIFT_VERSION = 3.0;
+ };
+ name = Debug;
+ };
+ 0C8A5E021D8D54EF00B71D95 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ CLANG_ANALYZER_NONNULL = YES;
+ CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
+ CLANG_WARN_SUSPICIOUS_MOVES = YES;
+ INFOPLIST_FILE = ChameleonExtension/Info.plist;
+ IPHONEOS_DEPLOYMENT_TARGET = 10.0;
+ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks";
+ PRODUCT_BUNDLE_IDENTIFIER = com.viccalexander.ChameleonDemo.ChameleonExtension;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SKIP_INSTALL = YES;
+ SWIFT_VERSION = 3.0;
+ };
+ name = Release;
+ };
0C8DABC61C07B5EA00B28FE2 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES;
- EMBEDDED_CONTENT_CONTAINS_SWIFT = YES;
INFOPLIST_FILE = "ChameleonDemo-Objc/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "com.viccalexander.ChameleonDemo-Objc";
PRODUCT_NAME = "$(TARGET_NAME)";
+ SWIFT_VERSION = 3.0;
};
name = Debug;
};
0C8DABC71C07B5EA00B28FE2 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES;
- EMBEDDED_CONTENT_CONTAINS_SWIFT = YES;
INFOPLIST_FILE = "ChameleonDemo-Objc/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "com.viccalexander.ChameleonDemo-Objc";
PRODUCT_NAME = "$(TARGET_NAME)";
+ SWIFT_VERSION = 3.0;
};
name = Release;
};
@@ -525,8 +777,10 @@
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
@@ -573,8 +827,10 @@
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
@@ -594,6 +850,7 @@
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
+ SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
VERSIONING_SYSTEM = "apple-generic";
@@ -606,6 +863,7 @@
buildSettings = {
CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = NO;
CLANG_ENABLE_MODULES = YES;
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
@@ -618,6 +876,7 @@
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
+ SWIFT_VERSION = 3.0;
};
name = Debug;
};
@@ -626,6 +885,7 @@
buildSettings = {
CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = NO;
CLANG_ENABLE_MODULES = YES;
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
@@ -637,36 +897,58 @@
PRODUCT_BUNDLE_IDENTIFIER = com.viccalexander.Chameleon;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
+ SWIFT_VERSION = 3.0;
};
name = Release;
};
247EB8B61BB61EB3009B4904 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
INFOPLIST_FILE = ChameleonDemo/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.viccalexander.ChameleonDemo;
PRODUCT_NAME = "$(TARGET_NAME)";
+ SWIFT_VERSION = 3.0;
};
name = Debug;
};
247EB8B71BB61EB3009B4904 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
INFOPLIST_FILE = ChameleonDemo/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.viccalexander.ChameleonDemo;
PRODUCT_NAME = "$(TARGET_NAME)";
+ SWIFT_VERSION = 3.0;
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
+ 0C8A5DEC1D8D4B7D00B71D95 /* Build configuration list for PBXNativeTarget "ChameleonExtension-ObjC" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 0C8A5DED1D8D4B7D00B71D95 /* Debug */,
+ 0C8A5DEE1D8D4B7D00B71D95 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ 0C8A5E031D8D54EF00B71D95 /* Build configuration list for PBXNativeTarget "ChameleonExtension" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 0C8A5E011D8D54EF00B71D95 /* Debug */,
+ 0C8A5E021D8D54EF00B71D95 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ };
0C8DABC51C07B5EA00B28FE2 /* Build configuration list for PBXNativeTarget "ChameleonDemo-Objc" */ = {
isa = XCConfigurationList;
buildConfigurations = (
diff --git a/Chameleon.xcodeproj/xcshareddata/xcschemes/Chameleon.xcscheme b/Chameleon.xcodeproj/xcshareddata/xcschemes/Chameleon.xcscheme
index 6dd086d..c4766a6 100755
--- a/Chameleon.xcodeproj/xcshareddata/xcschemes/Chameleon.xcscheme
+++ b/Chameleon.xcodeproj/xcshareddata/xcschemes/Chameleon.xcscheme
@@ -1,6 +1,6 @@
-#import "Chameleon_.h"
+#import
-#import "UIButton+Chameleon.h"
-#import "UILabel+Chameleon.h"
-#import "UIColor+ChameleonPrivate.h"
-#import "UIImage+ChameleonPrivate.h"
-#import "UIView+ChameleonPrivate.h"
-#import "UIAppearance+Swift.h"
+#import
+#import
+#import
+#import
+#import
+#import
-#import "NSArray+Chameleon.h"
-#import "UIColor+Chameleon.h"
-#import "UINavigationController+Chameleon.h"
-#import "UIViewController+Chameleon.h"
+#import
+#import
+#import
+#import
+#import
diff --git a/Chameleon/Info.plist b/Chameleon/Info.plist
index 0100960..a60ea4a 100755
--- a/Chameleon/Info.plist
+++ b/Chameleon/Info.plist
@@ -15,7 +15,7 @@
CFBundlePackageType
FMWK
CFBundleShortVersionString
- 2.0.6
+ 2.2.0
CFBundleSignature
????
CFBundleVersion
diff --git a/ChameleonDemo-ObjC/Info.plist b/ChameleonDemo-ObjC/Info.plist
index 0e4ed00..14de288 100755
--- a/ChameleonDemo-ObjC/Info.plist
+++ b/ChameleonDemo-ObjC/Info.plist
@@ -15,7 +15,7 @@
CFBundlePackageType
APPL
CFBundleShortVersionString
- 2.0.6
+ 2.2.0
CFBundleSignature
????
CFBundleVersion
diff --git a/ChameleonDemo/AppDelegate.swift b/ChameleonDemo/AppDelegate.swift
index 4076884..fff1d76 100755
--- a/ChameleonDemo/AppDelegate.swift
+++ b/ChameleonDemo/AppDelegate.swift
@@ -15,34 +15,34 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
- func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
+ func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
- Chameleon.setGlobalThemeUsingPrimaryColor(FlatMint(),
- withSecondaryColor: FlatBlue(),
- andContentStyle: UIContentStyle.Contrast)
+ Chameleon.setGlobalThemeUsingPrimaryColor(.flatMint(),
+ withSecondaryColor: .flatBlue(),
+ andContentStyle: UIContentStyle.contrast)
return true
}
- func applicationWillResignActive(application: UIApplication) {
+ func applicationWillResignActive(_ application: UIApplication) {
// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
// Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
}
- func applicationDidEnterBackground(application: UIApplication) {
+ func applicationDidEnterBackground(_ application: UIApplication) {
// Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
}
- func applicationWillEnterForeground(application: UIApplication) {
+ func applicationWillEnterForeground(_ application: UIApplication) {
// Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
}
- func applicationDidBecomeActive(application: UIApplication) {
+ func applicationDidBecomeActive(_ application: UIApplication) {
// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
}
- func applicationWillTerminate(application: UIApplication) {
+ func applicationWillTerminate(_ application: UIApplication) {
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
}
diff --git a/ChameleonDemo/Info.plist b/ChameleonDemo/Info.plist
index 66763b6..fdc1c43 100755
--- a/ChameleonDemo/Info.plist
+++ b/ChameleonDemo/Info.plist
@@ -15,7 +15,7 @@
CFBundlePackageType
APPL
CFBundleShortVersionString
- 2.0.6
+ 2.2.0
CFBundleSignature
????
CFBundleVersion
diff --git a/ChameleonDemo/ViewController.swift b/ChameleonDemo/ViewController.swift
index 9470986..9b3f122 100755
--- a/ChameleonDemo/ViewController.swift
+++ b/ChameleonDemo/ViewController.swift
@@ -15,6 +15,6 @@ class ViewController: UIViewController {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
- view.backgroundColor = FlatYellow()
+ view.backgroundColor = .flatYellow()
}
}
diff --git a/ChameleonExtension-ObjC/Info.plist b/ChameleonExtension-ObjC/Info.plist
new file mode 100644
index 0000000..abacadc
--- /dev/null
+++ b/ChameleonExtension-ObjC/Info.plist
@@ -0,0 +1,42 @@
+
+
+
+
+ CFBundleDevelopmentRegion
+ en
+ CFBundleDisplayName
+ ChameleonExtension-ObjC
+ CFBundleExecutable
+ $(EXECUTABLE_NAME)
+ CFBundleIdentifier
+ $(PRODUCT_BUNDLE_IDENTIFIER)
+ CFBundleInfoDictionaryVersion
+ 6.0
+ CFBundleName
+ $(PRODUCT_NAME)
+ CFBundlePackageType
+ XPC!
+ CFBundleShortVersionString
+ 2.2.0
+ CFBundleVersion
+ 1
+ NSExtension
+
+ NSExtensionAttributes
+
+ IsASCIICapable
+
+ PrefersRightToLeft
+
+ PrimaryLanguage
+ en-US
+ RequestsOpenAccess
+
+
+ NSExtensionPointIdentifier
+ com.apple.keyboard-service
+ NSExtensionPrincipalClass
+ KeyboardViewController
+
+
+
diff --git a/ChameleonExtension-ObjC/KeyboardViewController.h b/ChameleonExtension-ObjC/KeyboardViewController.h
new file mode 100644
index 0000000..d4442fd
--- /dev/null
+++ b/ChameleonExtension-ObjC/KeyboardViewController.h
@@ -0,0 +1,14 @@
+//
+// KeyboardViewController.h
+// ChameleonExtension-ObjC
+//
+// Created by Vicc Alexander on 9/17/16.
+// Copyright © 2016 Vicc Alexander. All rights reserved.
+//
+
+#import
+@import Chameleon;
+
+@interface KeyboardViewController : UIInputViewController
+
+@end
diff --git a/ChameleonExtension-ObjC/KeyboardViewController.m b/ChameleonExtension-ObjC/KeyboardViewController.m
new file mode 100644
index 0000000..6b852c4
--- /dev/null
+++ b/ChameleonExtension-ObjC/KeyboardViewController.m
@@ -0,0 +1,65 @@
+//
+// KeyboardViewController.m
+// ChameleonExtension-ObjC
+//
+// Created by Vicc Alexander on 9/17/16.
+// Copyright © 2016 Vicc Alexander. All rights reserved.
+//
+
+#import "KeyboardViewController.h"
+
+@interface KeyboardViewController ()
+@property (nonatomic, strong) UIButton *nextKeyboardButton;
+@end
+
+@implementation KeyboardViewController
+
+- (void)updateViewConstraints {
+ [super updateViewConstraints];
+
+ // Add custom view sizing constraints here
+}
+
+- (void)viewDidLoad {
+ [super viewDidLoad];
+
+ // Perform custom UI setup here
+ self.nextKeyboardButton = [UIButton buttonWithType:UIButtonTypeSystem];
+
+ [self.nextKeyboardButton setTitle:NSLocalizedString(@"Next Keyboard", @"Title for 'Next Keyboard' button") forState:UIControlStateNormal];
+ [self.nextKeyboardButton sizeToFit];
+ self.nextKeyboardButton.translatesAutoresizingMaskIntoConstraints = NO;
+
+ [self.nextKeyboardButton addTarget:self action:@selector(handleInputModeListFromView:withEvent:) forControlEvents:UIControlEventAllTouchEvents];
+
+ [self.view addSubview:self.nextKeyboardButton];
+
+ [self.nextKeyboardButton.leftAnchor constraintEqualToAnchor:self.view.leftAnchor].active = YES;
+ [self.nextKeyboardButton.bottomAnchor constraintEqualToAnchor:self.view.bottomAnchor].active = YES;
+
+ //Set Background Color
+ self.inputView.backgroundColor = FlatRed;
+}
+
+- (void)didReceiveMemoryWarning {
+ [super didReceiveMemoryWarning];
+ // Dispose of any resources that can be recreated
+}
+
+- (void)textWillChange:(id)textInput {
+ // The app is about to change the document's contents. Perform any preparation here.
+}
+
+- (void)textDidChange:(id)textInput {
+ // The app has just changed the document's contents, the document context has been updated.
+
+ UIColor *textColor = nil;
+ if (self.textDocumentProxy.keyboardAppearance == UIKeyboardAppearanceDark) {
+ textColor = [UIColor whiteColor];
+ } else {
+ textColor = [UIColor blackColor];
+ }
+ [self.nextKeyboardButton setTitleColor:textColor forState:UIControlStateNormal];
+}
+
+@end
diff --git a/ChameleonExtension/Info.plist b/ChameleonExtension/Info.plist
new file mode 100644
index 0000000..7f24dbb
--- /dev/null
+++ b/ChameleonExtension/Info.plist
@@ -0,0 +1,42 @@
+
+
+
+
+ CFBundleDevelopmentRegion
+ en
+ CFBundleDisplayName
+ ChameleonExtension
+ CFBundleExecutable
+ $(EXECUTABLE_NAME)
+ CFBundleIdentifier
+ $(PRODUCT_BUNDLE_IDENTIFIER)
+ CFBundleInfoDictionaryVersion
+ 6.0
+ CFBundleName
+ $(PRODUCT_NAME)
+ CFBundlePackageType
+ XPC!
+ CFBundleShortVersionString
+ 1.0
+ CFBundleVersion
+ 1
+ NSExtension
+
+ NSExtensionAttributes
+
+ IsASCIICapable
+
+ PrefersRightToLeft
+
+ PrimaryLanguage
+ en-US
+ RequestsOpenAccess
+
+
+ NSExtensionPointIdentifier
+ com.apple.keyboard-service
+ NSExtensionPrincipalClass
+ $(PRODUCT_MODULE_NAME).KeyboardViewController
+
+
+
diff --git a/ChameleonExtension/KeyboardViewController.swift b/ChameleonExtension/KeyboardViewController.swift
new file mode 100644
index 0000000..f5dcc24
--- /dev/null
+++ b/ChameleonExtension/KeyboardViewController.swift
@@ -0,0 +1,64 @@
+//
+// KeyboardViewController.swift
+// ChameleonExtension
+//
+// Created by Vicc Alexander on 9/17/16.
+// Copyright © 2016 Vicc Alexander. All rights reserved.
+//
+
+import UIKit
+import Chameleon
+
+class KeyboardViewController: UIInputViewController {
+
+ @IBOutlet var nextKeyboardButton: UIButton!
+
+ override func updateViewConstraints() {
+ super.updateViewConstraints()
+
+ // Add custom view sizing constraints here
+ }
+
+ override func viewDidLoad() {
+ super.viewDidLoad()
+
+ // Perform custom UI setup here
+ self.nextKeyboardButton = UIButton(type: .system)
+
+ self.nextKeyboardButton.setTitle(NSLocalizedString("Next Keyboard", comment: "Title for 'Next Keyboard' button"), for: [])
+ self.nextKeyboardButton.sizeToFit()
+ self.nextKeyboardButton.translatesAutoresizingMaskIntoConstraints = false
+
+ self.nextKeyboardButton.addTarget(self, action: #selector(handleInputModeList(from:with:)), for: .allTouchEvents)
+
+ self.view.addSubview(self.nextKeyboardButton)
+
+ self.nextKeyboardButton.leftAnchor.constraint(equalTo: self.view.leftAnchor).isActive = true
+ self.nextKeyboardButton.bottomAnchor.constraint(equalTo: self.view.bottomAnchor).isActive = true
+
+ inputView?.backgroundColor = .flatGreen()
+ }
+
+ override func didReceiveMemoryWarning() {
+ super.didReceiveMemoryWarning()
+ // Dispose of any resources that can be recreated
+ }
+
+ override func textWillChange(_ textInput: UITextInput?) {
+ // The app is about to change the document's contents. Perform any preparation here.
+ }
+
+ override func textDidChange(_ textInput: UITextInput?) {
+ // The app has just changed the document's contents, the document context has been updated.
+
+ var textColor: UIColor
+ let proxy = self.textDocumentProxy
+ if proxy.keyboardAppearance == UIKeyboardAppearance.dark {
+ textColor = UIColor.white
+ } else {
+ textColor = UIColor.black
+ }
+ self.nextKeyboardButton.setTitleColor(textColor, for: [])
+ }
+
+}
diff --git a/ChameleonFramework.podspec b/ChameleonFramework.podspec
index f021488..16512c3 100755
--- a/ChameleonFramework.podspec
+++ b/ChameleonFramework.podspec
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "ChameleonFramework"
- s.version = "2.1.0"
+ s.version = "2.2.0"
s.summary = "Color Framework for iOS (Obj-C & Swift)"
s.homepage = "https://github.com/ViccAlexander/Chameleon"
s.screenshots = "https://camo.githubusercontent.com/bde5aa6ee0e1feec044d184a735da8024c60c04c/687474703a2f2f692e696d6775722e636f6d2f427771486842342e706e67"
diff --git a/Pod/.DS_Store b/Pod/.DS_Store
new file mode 100644
index 0000000..5037311
Binary files /dev/null and b/Pod/.DS_Store differ
diff --git a/Pod/Classes/.DS_Store b/Pod/Classes/.DS_Store
new file mode 100644
index 0000000..46e5c89
Binary files /dev/null and b/Pod/Classes/.DS_Store differ
diff --git a/Pod/Classes/Objective-C/Chameleon_.m b/Pod/Classes/Objective-C/Chameleon_.m
index 4aab5a2..416e89e 100755
--- a/Pod/Classes/Objective-C/Chameleon_.m
+++ b/Pod/Classes/Objective-C/Chameleon_.m
@@ -10,6 +10,7 @@
#import "UILabel+Chameleon.h"
#import "UIButton+Chameleon.h"
#import "UIAppearance+Swift.h"
+#import "UIApplication+CHSharedApplication.h"
@implementation Chameleon
@@ -19,23 +20,8 @@ @implementation Chameleon
+ (void)setGlobalThemeUsingPrimaryColor:(UIColor *)primaryColor
withContentStyle:(UIContentStyle)contentStyle {
- if (contentStyle == UIContentStyleContrast) {
-
- if ([ContrastColor(primaryColor, YES) isEqual:FlatWhite]) {
- [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent];
- } else {
- [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleDefault];
- }
-
- } else if (contentStyle == UIContentStyleLight) {
-
- [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent];
-
- } else {
-
- [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleDefault];
- }
+ [[self class] updateStatusBarWithPrimaryColor:primaryColor andContentStyle:contentStyle];
[[self class] customizeBarButtonItemWithPrimaryColor:primaryColor contentStyle:contentStyle];
[[self class] customizeButtonWithPrimaryColor:primaryColor withContentStyle:contentStyle];
[[self class] customizeNavigationBarWithPrimaryColor:primaryColor withContentStyle:contentStyle];
@@ -56,23 +42,7 @@ + (void)setGlobalThemeUsingPrimaryColor:(UIColor *)primaryColor
withSecondaryColor:(UIColor *)secondaryColor
andContentStyle:(UIContentStyle)contentStyle {
- if (contentStyle == UIContentStyleContrast) {
-
- if ([ContrastColor(primaryColor, YES) isEqual:FlatWhite]) {
- [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent];
- } else {
- [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleDefault];
- }
-
- } else if (contentStyle == UIContentStyleLight) {
-
- [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent];
-
- } else {
-
- [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleDefault];
- }
-
+ [[self class] updateStatusBarWithPrimaryColor:primaryColor andContentStyle:contentStyle];
[[self class] customizeBarButtonItemWithPrimaryColor:primaryColor contentStyle:contentStyle];
[[self class] customizeButtonWithPrimaryColor:primaryColor secondaryColor:secondaryColor withContentStyle:contentStyle];
[[self class] customizeNavigationBarWithPrimaryColor:primaryColor withContentStyle:contentStyle];
@@ -93,23 +63,7 @@ + (void)setGlobalThemeUsingPrimaryColor:(UIColor *)primaryColor
usingFontName:(NSString *)fontName
andContentStyle:(UIContentStyle)contentStyle {
- if (contentStyle == UIContentStyleContrast) {
-
- if ([ContrastColor(primaryColor, YES) isEqual:FlatWhite]) {
- [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent];
- } else {
- [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleDefault];
- }
-
- } else if (contentStyle == UIContentStyleLight) {
-
- [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent];
-
- } else {
-
- [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleDefault];
- }
-
+ [[self class] updateStatusBarWithPrimaryColor:primaryColor andContentStyle:contentStyle];
[[UILabel appearance] setSubstituteFontName:fontName];
[[UIButton appearance] setSubstituteFontName:fontName];
@@ -161,6 +115,33 @@ + (void)setGlobalThemeUsingPrimaryColor:(UIColor *)primaryColor
*/
}
+#pragma mark - UIStatusBarStyle
+
++ (void)updateStatusBarWithPrimaryColor:(UIColor *)primaryColor andContentStyle:(UIContentStyle)contentStyle {
+
+ UIApplication *application = [UIApplication CH_sharedApplication];
+ if (contentStyle == UIContentStyleContrast && application) {
+
+ if ([ContrastColor(primaryColor, YES) isEqual:FlatWhite]) {
+ [application setStatusBarStyle:UIStatusBarStyleLightContent];
+ } else {
+ [application setStatusBarStyle:UIStatusBarStyleDefault];
+ }
+
+ } else if (contentStyle == UIContentStyleLight) {
+
+ if (application) {
+ [application setStatusBarStyle:UIStatusBarStyleLightContent];
+ }
+
+ } else {
+
+ if (application) {
+ [application setStatusBarStyle:UIStatusBarStyleDefault];
+ }
+ }
+}
+
#pragma mark - UIBarButtonItem
+ (void)customizeBarButtonItemWithPrimaryColor:(UIColor *)primaryColor
diff --git a/Pod/Classes/Objective-C/UIApplication+CHSharedApplication.h b/Pod/Classes/Objective-C/UIApplication+CHSharedApplication.h
new file mode 100644
index 0000000..5f79567
--- /dev/null
+++ b/Pod/Classes/Objective-C/UIApplication+CHSharedApplication.h
@@ -0,0 +1,16 @@
+//
+// UIApplication+CHSharedApplication.h
+// Pods
+//
+// Created by Vicc Alexander on 9/16/16.
+//
+//
+
+#import
+
+@interface UIApplication (CHSharedApplication)
+
+
++ (UIApplication *)CH_sharedApplication;
+
+@end
diff --git a/Pod/Classes/Objective-C/UIApplication+CHSharedApplication.m b/Pod/Classes/Objective-C/UIApplication+CHSharedApplication.m
new file mode 100644
index 0000000..b0f26c8
--- /dev/null
+++ b/Pod/Classes/Objective-C/UIApplication+CHSharedApplication.m
@@ -0,0 +1,30 @@
+//
+// UIApplication+CHSharedApplication.m
+// Pods
+//
+// Created by Vicc Alexander on 9/16/16.
+//
+//
+
+#import "UIApplication+CHSharedApplication.h"
+#import
+
+@implementation UIApplication (CHSharedApplication)
+
++ (void)load {
+
+ if (![[[NSBundle mainBundle] bundlePath] hasSuffix:@".appex"]) {
+ Method sharedApplicationMethod = class_getClassMethod([UIApplication class], @selector(sharedApplication));
+ if (sharedApplicationMethod != NULL) {
+ IMP sharedApplicationMethodImplementation = method_getImplementation(sharedApplicationMethod);
+ Method CH_sharedApplicationMethod = class_getClassMethod([UIApplication class], @selector(CH_sharedApplication));
+ method_setImplementation(CH_sharedApplicationMethod, sharedApplicationMethodImplementation);
+ }
+ }
+}
+
++ (UIApplication *)CH_sharedApplication {
+ return nil;
+}
+
+@end
diff --git a/Pod/Classes/Objective-C/UIColor+Chameleon.h b/Pod/Classes/Objective-C/UIColor+Chameleon.h
index 22d9b7c..c5ab19b 100755
--- a/Pod/Classes/Objective-C/UIColor+Chameleon.h
+++ b/Pod/Classes/Objective-C/UIColor+Chameleon.h
@@ -457,7 +457,7 @@ typedef NS_ENUM (NSInteger, UIShadeStyle) {
*
* Returns a randomly generated flat color object NOT found in the specified array.
*
- * @param excludedColors An array specifying which colors NOT to return.
+ * @param colors An array specifying which colors NOT to return.
*
* @return A flat @c UIColor object in the HSB colorspace.
*
@@ -558,8 +558,8 @@ typedef NS_ENUM (NSInteger, UIShadeStyle) {
/**
* Creates and returns either a black or white color object depending on which contrasts more with a specified color.
*
- * @param color The specified color of the contrast color that is being requested.
- * @param isFlat Pass YES to return flat color objects.
+ * @param backgroundColor The specified color of the contrast color that is being requested.
+ * @param flat Pass YES to return flat color objects.
*
* @return A UIColor object in the HSB colorspace.
*
@@ -571,8 +571,8 @@ typedef NS_ENUM (NSInteger, UIShadeStyle) {
/**
* Creates and returns either a black or white color object depending on which contrasts more with a specified color.
*
- * @param color The specified color of the contrast color that is being requested.
- * @param isFlat Pass YES to return flat color objects.
+ * @param backgroundColor The specified color of the contrast color that is being requested.
+ * @param flat Pass YES to return flat color objects.
* @param alpha The opacity.
*
* @return A UIColor object in the HSB colorspace.
diff --git a/Pod/Classes/Objective-C/UIViewController+Chameleon.m b/Pod/Classes/Objective-C/UIViewController+Chameleon.m
index b6b4691..4a4eb3e 100755
--- a/Pod/Classes/Objective-C/UIViewController+Chameleon.m
+++ b/Pod/Classes/Objective-C/UIViewController+Chameleon.m
@@ -21,6 +21,8 @@
#import "UIButton+Chameleon.h"
#import "UIAppearance+Swift.h"
+#import "UIApplication+CHSharedApplication.h"
+
@interface UIViewController ()
@property (readwrite) BOOL shouldContrast;
@@ -126,7 +128,8 @@ - (UIStatusBarStyle)chameleon_preferredStatusBarStyle {
if (self.shouldContrast) {
- CGRect statusBarFrame = [UIApplication sharedApplication].statusBarFrame;
+ UIApplication *application = [UIApplication CH_sharedApplication];
+ CGRect statusBarFrame = application.statusBarFrame;
UIView *topView = [self.view findTopMostViewForPoint:CGPointMake(CGRectGetMidX(statusBarFrame), 2)];
return [self contrastingStatusBarStyleForColor:topView.backgroundColor];
@@ -145,23 +148,7 @@ - (UIStatusBarStyle)chameleon_preferredStatusBarStyle {
- (void)setThemeUsingPrimaryColor:(UIColor *)primaryColor
withContentStyle:(UIContentStyle)contentStyle {
- if (contentStyle == UIContentStyleContrast) {
-
- if ([ContrastColor(primaryColor, YES) isEqual:FlatWhite]) {
- [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent];
- } else {
- [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleDefault];
- }
-
- } else if (contentStyle == UIContentStyleLight) {
-
- [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent];
-
- } else {
-
- [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleDefault];
- }
-
+ [[self class] updateStatusBarWithPrimaryColor:primaryColor andContentStyle:contentStyle];
[[self class] customizeBarButtonItemWithPrimaryColor:primaryColor contentStyle:contentStyle];
[[self class] customizeButtonWithPrimaryColor:primaryColor withContentStyle:contentStyle];
[[self class] customizeNavigationBarWithPrimaryColor:primaryColor withContentStyle:contentStyle];
@@ -181,23 +168,7 @@ - (void)setThemeUsingPrimaryColor:(UIColor *)primaryColor
withSecondaryColor:(UIColor *)secondaryColor
andContentStyle:(UIContentStyle)contentStyle {
- if (contentStyle == UIContentStyleContrast) {
-
- if ([ContrastColor(primaryColor, YES) isEqual:FlatWhite]) {
- [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent];
- } else {
- [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleDefault];
- }
-
- } else if (contentStyle == UIContentStyleLight) {
-
- [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent];
-
- } else {
-
- [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleDefault];
- }
-
+ [[self class] updateStatusBarWithPrimaryColor:primaryColor andContentStyle:contentStyle];
[[self class] customizeBarButtonItemWithPrimaryColor:primaryColor contentStyle:contentStyle];
[[self class] customizeButtonWithPrimaryColor:primaryColor secondaryColor:secondaryColor withContentStyle:contentStyle];
[[self class] customizeNavigationBarWithPrimaryColor:primaryColor withContentStyle:contentStyle];
@@ -218,22 +189,7 @@ - (void)setThemeUsingPrimaryColor:(UIColor *)primaryColor
usingFontName:(NSString *)fontName
andContentStyle:(UIContentStyle)contentStyle {
- if (contentStyle == UIContentStyleContrast) {
-
- if ([ContrastColor(primaryColor, YES) isEqual:FlatWhite]) {
- [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent];
- } else {
- [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleDefault];
- }
-
- } else if (contentStyle == UIContentStyleLight) {
-
- [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent];
-
- } else {
-
- [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleDefault];
- }
+ [[self class] updateStatusBarWithPrimaryColor:primaryColor andContentStyle:contentStyle];
[[UILabel appearance] setSubstituteFontName:fontName];
[[UIButton appearance] setSubstituteFontName:fontName];
@@ -253,6 +209,33 @@ - (void)setThemeUsingPrimaryColor:(UIColor *)primaryColor
[[self class] customizeImagePickerControllerWithPrimaryColor:primaryColor withContentStyle:contentStyle];
}
+#pragma mark - UIStatusBarStyle
+
++ (void)updateStatusBarWithPrimaryColor:(UIColor *)primaryColor andContentStyle:(UIContentStyle)contentStyle {
+
+ UIApplication *application = [UIApplication CH_sharedApplication];
+ if (contentStyle == UIContentStyleContrast && application) {
+
+ if ([ContrastColor(primaryColor, YES) isEqual:FlatWhite]) {
+ [application setStatusBarStyle:UIStatusBarStyleLightContent];
+ } else {
+ [application setStatusBarStyle:UIStatusBarStyleDefault];
+ }
+
+ } else if (contentStyle == UIContentStyleLight) {
+
+ if (application) {
+ [application setStatusBarStyle:UIStatusBarStyleLightContent];
+ }
+
+ } else {
+
+ if (application) {
+ [application setStatusBarStyle:UIStatusBarStyleDefault];
+ }
+ }
+}
+
#pragma mark - UIBarButtonItem
+ (void)customizeBarButtonItemWithPrimaryColor:(UIColor *)primaryColor
diff --git a/Pod/Classes/Swift/ChameleonShorthand.swift b/Pod/Classes/Swift/ChameleonShorthand.swift
index 5155242..a7ba202 100755
--- a/Pod/Classes/Swift/ChameleonShorthand.swift
+++ b/Pod/Classes/Swift/ChameleonShorthand.swift
@@ -38,7 +38,7 @@ Creates and returns a complementary flat color object 180 degrees away in the HS
- returns: A flat UIColor object in the HSB colorspace.
*/
-public func ComplementaryFlatColorOf(color: UIColor) -> UIColor {
+public func ComplementaryFlatColorOf(_ color: UIColor) -> UIColor {
return UIColor(complementaryFlatColorOf: color)
}
@@ -49,8 +49,8 @@ public func ComplementaryFlatColorOf(color: UIColor) -> UIColor {
- returns: A flat UIColor object in the HSB colorspace.
*/
-public func RandomFlatColorWithShade(shade: UIShadeStyle) -> UIColor {
- return UIColor(randomFlatColorOfShadeStyle: shade)
+public func RandomFlatColorWithShade(_ shade: UIShadeStyle) -> UIColor {
+ return UIColor(randomFlatColorOf: shade)
}
/**
@@ -61,7 +61,7 @@ public func RandomFlatColorWithShade(shade: UIShadeStyle) -> UIColor {
- returns: A UIColor object in the HSB colorspace.
*/
-public func ContrastColorOf(backgroundColor: UIColor, returnFlat: Bool) -> UIColor {
+public func ContrastColorOf(_ backgroundColor: UIColor, returnFlat: Bool) -> UIColor {
return UIColor(contrastingBlackOrWhiteColorOn: backgroundColor, isFlat: returnFlat)
}
@@ -74,11 +74,11 @@ public func ContrastColorOf(backgroundColor: UIColor, returnFlat: Bool) -> UICol
- returns: A UIColor object using colorWithPattern.
*/
-public func GradientColor(gradientStyle: UIGradientStyle, frame: CGRect, colors: [UIColor]) -> UIColor {
+public func GradientColor(_ gradientStyle: UIGradientStyle, frame: CGRect, colors: [UIColor]) -> UIColor {
return UIColor(gradientStyle: gradientStyle, withFrame: frame, andColors: colors)
}
-public func HexColor(hexString: String, _ alpha: CGFloat = 1.0) -> UIColor {
+public func HexColor(_ hexString: String, _ alpha: CGFloat = 1.0) -> UIColor {
return UIColor(hexString: hexString, withAlpha: alpha)
}
@@ -89,8 +89,8 @@ public func HexColor(hexString: String, _ alpha: CGFloat = 1.0) -> UIColor {
- returns: A flat UIColor object in the HSB colorspace.
*/
-public func AverageColorFromImage(image: UIImage) -> UIColor {
- return UIColor(averageColorFromImage: image)
+public func AverageColorFromImage(_ image: UIImage) -> UIColor {
+ return UIColor(averageColorFrom: image)
}
// MARK: - Array Methods Shorthand
@@ -106,8 +106,8 @@ Generates and creates an array of 5 color objects in the HSB colorspace from the
- returns: An array of 5 color objects in the HSB colorspace.
*/
-public func ColorSchemeOf(colorSchemeType:ColorScheme, color:UIColor, isFlatScheme:Bool) -> [UIColor] {
- return NSArray(ofColorsWithColorScheme: colorSchemeType, usingColor: color, withFlatScheme: isFlatScheme) as! [UIColor]
+public func ColorSchemeOf(_ colorSchemeType:ColorScheme, color:UIColor, isFlatScheme:Bool) -> [UIColor] {
+ return NSArray(ofColorsWith: colorSchemeType, using: color, withFlatScheme: isFlatScheme) as! [UIColor]
}
/**
@@ -118,220 +118,8 @@ Generates and creates an array of 5 color objects in the HSB colorspace that app
- returns: An array of 5 color objects in the HSB colorspace.
*/
-public func ColorsFromImage(image: UIImage, withFlatScheme: Bool) -> [UIColor] {
+public func ColorsFromImage(_ image: UIImage, withFlatScheme: Bool) -> [UIColor] {
// TODO: Remove forced casting
- return NSArray(ofColorsFromImage: image, withFlatScheme: withFlatScheme) as! [UIColor]
+ return NSArray(ofColorsFrom: image, withFlatScheme: withFlatScheme) as! [UIColor]
}
-
-// MARK: - Special Colors Shorthand
-
-/**
-Returns a randomly generated flat color object whose alpha value is 1.0.
-
-- returns: A flat UIColor object in the HSB colorspace.
-*/
-public func RandomFlatColor() -> UIColor {
- return UIColor.randomFlatColor()
-}
-
-public func ClearColor() -> UIColor {
- return UIColor.clearColor()
-}
-
-
-// MARK: - Light Shades Shorthand
-
-public func FlatBlack() -> UIColor {
- return UIColor.flatBlackColor()
-}
-
-public func FlatBlue() -> UIColor {
- return UIColor.flatBlueColor()
-}
-
-public func FlatBrown() -> UIColor {
- return UIColor.flatBrownColor()
-}
-
-public func FlatCoffee() -> UIColor {
- return UIColor.flatCoffeeColor()
-}
-
-public func FlatForestGreen() -> UIColor {
- return UIColor.flatForestGreenColor()
-}
-
-public func FlatGray() -> UIColor {
- return UIColor.flatGrayColor()
-}
-
-public func FlatGreen() -> UIColor {
- return UIColor.flatGreenColor()
-}
-
-public func FlatLime() -> UIColor {
- return UIColor.flatLimeColor()
-}
-
-public func FlatMagenta() -> UIColor {
- return UIColor.flatMagentaColor()
-}
-
-public func FlatMaroon() -> UIColor {
- return UIColor.flatMaroonColor()
-}
-
-public func FlatMint() -> UIColor {
- return UIColor.flatMintColor()
-}
-
-public func FlatNavyBlue() -> UIColor {
- return UIColor.flatNavyBlueColor()
-}
-
-public func FlatOrange() -> UIColor {
- return UIColor.flatOrangeColor()
-}
-
-public func FlatPink() -> UIColor {
- return UIColor.flatPinkColor()
-}
-
-public func FlatPlum() -> UIColor {
- return UIColor.flatPlumColor()
-}
-
-public func FlatPowderBlue() -> UIColor {
- return UIColor.flatPowderBlueColor()
-}
-
-public func FlatPurple() -> UIColor {
- return UIColor.flatPurpleColor()
-}
-
-public func FlatRed() -> UIColor {
- return UIColor.flatRedColor()
-}
-
-public func FlatSand() -> UIColor {
- return UIColor.flatSandColor()
-}
-
-public func FlatSkyBlue() -> UIColor {
- return UIColor.flatSkyBlueColor()
-}
-
-public func FlatTeal() -> UIColor {
- return UIColor.flatTealColor()
-}
-
-public func FlatWatermelon() -> UIColor {
- return UIColor.flatWatermelonColor()
-}
-
-public func FlatWhite() -> UIColor {
- return UIColor.flatWhiteColor()
-}
-
-public func FlatYellow() -> UIColor {
- return UIColor.flatYellowColor()
-}
-
-// MARK: - Chameleon - Dark Shades Shorthand
-
-public func FlatBlackDark() -> UIColor {
- return UIColor.flatBlackColorDark()
-}
-
-public func FlatBlueDark() -> UIColor {
- return UIColor.flatBlueColorDark()
-}
-
-public func FlatBrownDark() -> UIColor {
- return UIColor.flatBrownColorDark()
-}
-
-public func FlatCoffeeDark() -> UIColor {
- return UIColor.flatCoffeeColorDark()
-}
-
-public func FlatForestGreenDark() -> UIColor {
- return UIColor.flatForestGreenColorDark()
-}
-
-public func FlatGrayDark() -> UIColor {
- return UIColor.flatGrayColorDark()
-}
-
-public func FlatGreenDark() -> UIColor {
- return UIColor.flatGreenColorDark()
-}
-
-public func FlatLimeDark() -> UIColor {
- return UIColor.flatLimeColorDark()
-}
-
-public func FlatMagentaDark() -> UIColor {
- return UIColor.flatMagentaColorDark()
-}
-
-public func FlatMaroonDark() -> UIColor {
- return UIColor.flatMaroonColorDark()
-}
-
-public func FlatMintDark() -> UIColor {
- return UIColor.flatMintColorDark()
-}
-
-public func FlatNavyBlueDark() -> UIColor {
- return UIColor.flatNavyBlueColorDark()
-}
-
-public func FlatOrangeDark() -> UIColor {
- return UIColor.flatOrangeColorDark()
-}
-
-public func FlatPinkDark() -> UIColor {
- return UIColor.flatPinkColorDark()
-}
-
-public func FlatPlumDark() -> UIColor {
- return UIColor.flatPlumColorDark()
-}
-
-public func FlatPowderBlueDark() -> UIColor {
- return UIColor.flatPowderBlueColorDark()
-}
-
-public func FlatPurpleDark() -> UIColor {
- return UIColor.flatPurpleColorDark()
-}
-
-public func FlatRedDark() -> UIColor {
- return UIColor.flatRedColorDark()
-}
-
-public func FlatSandDark() -> UIColor {
- return UIColor.flatSandColorDark()
-}
-
-public func FlatSkyBlueDark() -> UIColor {
- return UIColor.flatSkyBlueColorDark()
-}
-
-public func FlatTealDark() -> UIColor {
- return UIColor.flatTealColorDark()
-}
-
-public func FlatWatermelonDark() -> UIColor {
- return UIColor.flatWatermelonColorDark()
-}
-
-public func FlatWhiteDark() -> UIColor {
- return UIColor.flatWhiteColorDark()
-}
-
-public func FlatYellowDark() -> UIColor {
- return UIColor.flatYellowColorDark()
-}
diff --git a/README.md b/README.md
index 32d6f30..e76b03c 100644
--- a/README.md
+++ b/README.md
@@ -18,13 +18,15 @@
With Chameleon, you can easily stop tinkering with RGB values, wasting hours figuring out the right color combinations to use in your app, and worrying about whether your text will be readable on the various background colors of your app.
+###### Update: Chameleon now works with app extensions! 🔥
+
### Features
-### App Showcase ![New](http://i.imgur.com/BX3b9ES.png)
+### App Showcase
###### In an upcoming update we'll begin showcasing some of the best apps and companies making use of Chameleon. If you'd like to see your app featured in this section, make sure to add it [here](https://airtable.com/shrr1WK6dLQBZfXV0).
@@ -35,9 +37,7 @@ With Chameleon, you can easily stop tinkering with RGB values, wasting hours fig
[● Contributions](https://github.com/ViccAlexander/Chameleon#-contributions)
[● Documentation](https://github.com/ViccAlexander/Chameleon#-documentation)
[● Storyboard Add-On](https://github.com/ViccAlexander/Chameleon#storyboard-add-on)
-[● Sketch Add-On](https://github.com/ViccAlexander/Chameleon#sketch-add-on)
[● Author](https://github.com/ViccAlexander/Chameleon#-author)
-[● Special Thanks](https://github.com/ViccAlexander/Chameleon#-special-thanks)
[● To Do List](https://github.com/ViccAlexander/Chameleon#-to-do-list)
[● Change Log](https://github.com/ViccAlexander/Chameleon#-change-log)
@@ -122,9 +122,13 @@ Chameleon's documentation, while written as clearly and concisely as possible ma
-### Storyboard Palette
+### Palettes
+
+If you're like us and love to use storyboards, Chameleon's got you covered. We've provided you with a quick and easy way to access Chameleon colors right from Storyboard, and any other app that uses the color picker (i.e. TextEdit). In addition you can even import the palette directly into Photoshop and Sketch.
-If you're like me and love to use storyboard, Chameleon's got you covered. We've provided you with a quick and easy way to access Chameleon colors right from Storyboard, and any other app that uses the color picker (i.e. TextEdit).
+
+
+
@@ -149,7 +153,7 @@ All methods, properties, and types available in Chameleon are documented below.
#####Documentation Table of Contents
[● Installation](https://github.com/ViccAlexander/Chameleon#installation)
-[● Storyboard-Add On](https://github.com/ViccAlexander/Chameleon#storyboard-add-on)
+[● Palettes](https://github.com/ViccAlexander/Chameleon#palettes)
[● Usage](https://github.com/ViccAlexander/Chameleon#usage)
[● UIColor Methods](https://github.com/ViccAlexander/Chameleon#uicolor-methods)
[● Colors From Images](https://github.com/ViccAlexander/Chameleon#colors-from-images)
@@ -159,7 +163,7 @@ All methods, properties, and types available in Chameleon are documented below.
###Installation
-Swift 3 version maintained in a separate branch until it's release.
+###### Note: Swift 3 version maintained in a separate branch until it's release.
####CocoaPods Installation
Chameleon is now available on [CocoaPods](http://cocoapods.org). Simply add the following to your project Podfile, and you'll be good to go.
@@ -194,7 +198,8 @@ If you rather install this framework manually, just drag and drop the Chameleon
If you're working with Swift and are manually installing Chameleon, there's an additional step. Make sure to download and drag the following file, [ChameleonShorthand.swift](https://github.com/ViccAlexander/Chameleon/blob/master/Pod/Classes/Swift/ChameleonShorthand.swift), into your project, and you'll be good to go.
-####Storyboard Add-On
+####Palettes
+##### Storyboard Add-On
Using Chameleon's awesome palette in Storyboard is easy! Simply download and install [Chameleon Palette](https://github.com/ViccAlexander/Chameleon/blob/master/Extras/Chameleon.dmg?raw=true).
Once installed, make sure to restart Xcode. You'll find all of Chameleon's colors in the Palette Color Picker whenever they're needed! :)
@@ -207,7 +212,10 @@ Once installed, make sure to restart Xcode. You'll find all of Chameleon's color
-####Sketch Add-On
+##### Photoshop Add-On
+Using Chameleon's awesome palette in Sketch is easy! Simply download and install [Photoshop Palette](https://github.com/ViccAlexander/Chameleon/blob/master/Extras/Chameleon_Photoshop.aco?raw=true).
+
+##### Sketch Add-On
Using Chameleon's awesome palette in Sketch is easy! Simply download and install [Sketch Palette](https://github.com/ViccAlexander/Chameleon/blob/master/Extras/Chameleon.sketchpalette?raw=true).
###Usage
@@ -717,6 +725,8 @@ var firstColor = colorArray[0] as! UIColor
With Chameleon, you can now specify a global color theme with simply one line of code (It even takes care of dealing with the status bar style as well)! Here's one of three methods to get you started. `ContentStyle` allows you to decide whether text and a few other elements should be white, black, or whichever contrasts more over any UI element's `backgroundColor`.
+######Note: `ContentStyle` is not available in App Extensions.
+
To set a global theme, you can do the following in your app delegate:
#####Normal Convention:
@@ -757,10 +767,7 @@ self.navigationController?.hidesNavigationBarHairline = true
```
## 👑 Author
-Chameleon was developed by **Vicc Alexander** [(@ViccsMind)](https://twitter.com/viccsmind) in 2014. Currently, it is being maintained by [@ViccAlexander](https://github.com/ViccAlexander) and [@Bre7](https://github.com/bre7).
-
-##### Support ☕️
-If you enjoy Chameleon and would like to buy us a coffee we'd appreciate it.
+Chameleon was developed by **Vicc Alexander** [(@ViccsMind)](https://twitter.com/viccsmind) in 2014 using Objective-C. In 2015, full Swift support was implemented by [@Bre7](https://github.com/bre7). Currently, it is being maintained by both [@ViccAlexander](https://github.com/ViccAlexander) and [@Bre7](https://github.com/bre7).
## 📝 To Do List
* ~~CocoaPods Support~~ ![1.0.1](http://i.imgur.com/8Li5aRR.png)
@@ -776,6 +783,8 @@ If you enjoy Chameleon and would like to buy us a coffee we'd appreciate it.