diff --git a/Chameleon.xcodeproj/project.pbxproj b/Chameleon.xcodeproj/project.pbxproj index 271dce6..e79c6ce 100755 --- a/Chameleon.xcodeproj/project.pbxproj +++ b/Chameleon.xcodeproj/project.pbxproj @@ -390,7 +390,7 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0900; - LastUpgradeCheck = 0900; + LastUpgradeCheck = 1100; ORGANIZATIONNAME = "Vicc Alexander"; TargetAttributes = { 0C8DABB01C07B5EA00B28FE2 = { @@ -411,7 +411,7 @@ }; buildConfigurationList = 240093F21BB4517400932727 /* Build configuration list for PBXProject "Chameleon" */; compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; + developmentRegion = en; hasScannedForEncodings = 0; knownRegions = ( en, @@ -614,6 +614,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; @@ -622,12 +623,14 @@ CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 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_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; @@ -660,6 +663,7 @@ ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 4.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; @@ -670,6 +674,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; @@ -678,12 +683,14 @@ CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 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_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; @@ -709,6 +716,7 @@ MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + SWIFT_VERSION = 4.0; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; VERSIONING_SYSTEM = "apple-generic"; @@ -730,11 +738,12 @@ INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MARKETING_VERSION = 2.0.7; PRODUCT_BUNDLE_IDENTIFIER = com.viccalexander.Chameleon; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 5.0; }; name = Debug; }; @@ -752,10 +761,11 @@ INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MARKETING_VERSION = 2.0.7; PRODUCT_BUNDLE_IDENTIFIER = com.viccalexander.Chameleon; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 5.0; }; name = Release; }; @@ -780,7 +790,7 @@ PRODUCT_BUNDLE_IDENTIFIER = "com.viccalexander.ChameleonDemo-Swift"; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 4.0; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Debug; @@ -805,7 +815,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "com.viccalexander.ChameleonDemo-Swift"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 4.0; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Release; @@ -819,7 +829,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.viccalexander.ChameleonDemo; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 4.0; }; name = Debug; }; @@ -832,7 +842,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.viccalexander.ChameleonDemo; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 4.0; }; name = Release; }; diff --git a/Chameleon.xcodeproj/xcshareddata/xcschemes/Chameleon.xcscheme b/Chameleon.xcodeproj/xcshareddata/xcschemes/Chameleon.xcscheme index a813637..b1e8482 100755 --- a/Chameleon.xcodeproj/xcshareddata/xcschemes/Chameleon.xcscheme +++ b/Chameleon.xcodeproj/xcshareddata/xcschemes/Chameleon.xcscheme @@ -1,6 +1,6 @@ - - - - CFBundlePackageType FMWK CFBundleShortVersionString - 2.0.6 + $(MARKETING_VERSION) CFBundleSignature ???? CFBundleVersion diff --git a/ChameleonDemo-Swift/FirstViewController.swift b/ChameleonDemo-Swift/FirstViewController.swift index 01ef1aa..e573428 100644 --- a/ChameleonDemo-Swift/FirstViewController.swift +++ b/ChameleonDemo-Swift/FirstViewController.swift @@ -59,7 +59,7 @@ class FirstViewController: UITableViewController { let randomFlatColorContract = ContrastColorOf(randomFlatColor, returnFlat: true) // Nav bar navigationController?.navigationBar.barTintColor = randomFlatColor - navigationController?.navigationBar.titleTextAttributes = [NSForegroundColorAttributeName: randomFlatColorContract] + navigationController?.navigationBar.titleTextAttributes = [NSAttributedStringKey.foregroundColor.rawValue: randomFlatColorContract] // Tab bar tabBarController?.tabBar.barTintColor = randomFlatColor tabBarController?.tabBar.tintColor = randomFlatColorContract diff --git a/ChameleonDemo-Swift/SecondViewController.swift b/ChameleonDemo-Swift/SecondViewController.swift index a0f1246..e786c26 100644 --- a/ChameleonDemo-Swift/SecondViewController.swift +++ b/ChameleonDemo-Swift/SecondViewController.swift @@ -42,7 +42,7 @@ class SecondViewController: UITableViewController { override func viewDidLoad() { super.viewDidLoad() - navigationController?.navigationBar.titleTextAttributes = [NSForegroundColorAttributeName: tabBarController?.tabBar.tintColor ?? UIColor.gray] + navigationController?.navigationBar.titleTextAttributes = [NSAttributedStringKey.foregroundColor.rawValue: tabBarController?.tabBar.tintColor ?? UIColor.gray] navigationController?.navigationBar.barTintColor = tabBarController?.tabBar.barTintColor ?? UIColor.lightGray sampleOneImageView.image = #imageLiteral(resourceName: "SampleImageOne") sampleTwoImageView.image = #imageLiteral(resourceName: "SampleImageTwo") @@ -54,7 +54,7 @@ class SecondViewController: UITableViewController { } override func viewWillAppear(_ animated: Bool) { - navigationController?.navigationBar.titleTextAttributes = [NSForegroundColorAttributeName: tabBarController?.tabBar.tintColor ?? UIColor.gray] + navigationController?.navigationBar.titleTextAttributes = [NSAttributedStringKey.foregroundColor.rawValue: tabBarController?.tabBar.tintColor ?? UIColor.gray] navigationController?.navigationBar.barTintColor = tabBarController?.tabBar.barTintColor ?? UIColor.lightGray } diff --git a/Pod/Classes/Swift/ChameleonShorthand.swift b/Pod/Classes/Swift/ChameleonShorthand.swift index a33d633..4e16576 100755 --- a/Pod/Classes/Swift/ChameleonShorthand.swift +++ b/Pod/Classes/Swift/ChameleonShorthand.swift @@ -132,7 +132,7 @@ 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.randomFlat + return UIColor.randomFlat() } public func ClearColor() -> UIColor { @@ -143,195 +143,195 @@ public func ClearColor() -> UIColor { // MARK: - Light Shades Shorthand public func FlatBlack() -> UIColor { - return UIColor.flatBlack + return UIColor.flatBlack() } public func FlatBlue() -> UIColor { - return UIColor.flatBlue + return UIColor.flatBlue() } public func FlatBrown() -> UIColor { - return UIColor.flatBrown + return UIColor.flatBrown() } public func FlatCoffee() -> UIColor { - return UIColor.flatCoffee + return UIColor.flatCoffee() } public func FlatForestGreen() -> UIColor { - return UIColor.flatForestGreen + return UIColor.flatForestGreen() } public func FlatGray() -> UIColor { - return UIColor.flatGray + return UIColor.flatGray() } public func FlatGreen() -> UIColor { - return UIColor.flatGreen + return UIColor.flatGreen() } public func FlatLime() -> UIColor { - return UIColor.flatLime + return UIColor.flatLime() } public func FlatMagenta() -> UIColor { - return UIColor.flatMagenta + return UIColor.flatMagenta() } public func FlatMaroon() -> UIColor { - return UIColor.flatMaroon + return UIColor.flatMaroon() } public func FlatMint() -> UIColor { - return UIColor.flatMint + return UIColor.flatMint() } public func FlatNavyBlue() -> UIColor { - return UIColor.flatNavyBlue + return UIColor.flatNavyBlue() } public func FlatOrange() -> UIColor { - return UIColor.flatOrange + return UIColor.flatOrange() } public func FlatPink() -> UIColor { - return UIColor.flatPink + return UIColor.flatPink() } public func FlatPlum() -> UIColor { - return UIColor.flatPlum + return UIColor.flatPlum() } public func FlatPowderBlue() -> UIColor { - return UIColor.flatPowderBlue + return UIColor.flatPowderBlue() } public func FlatPurple() -> UIColor { - return UIColor.flatPurple + return UIColor.flatPurple() } public func FlatRed() -> UIColor { - return UIColor.flatRed + return UIColor.flatRed() } public func FlatSand() -> UIColor { - return UIColor.flatSand + return UIColor.flatSand() } public func FlatSkyBlue() -> UIColor { - return UIColor.flatSkyBlue + return UIColor.flatSkyBlue() } public func FlatTeal() -> UIColor { - return UIColor.flatTeal + return UIColor.flatTeal() } public func FlatWatermelon() -> UIColor { - return UIColor.flatWatermelon + return UIColor.flatWatermelon() } public func FlatWhite() -> UIColor { - return UIColor.flatWhite + return UIColor.flatWhite() } public func FlatYellow() -> UIColor { - return UIColor.flatYellow + return UIColor.flatYellow() } // MARK: - Chameleon - Dark Shades Shorthand public func FlatBlackDark() -> UIColor { - return UIColor.flatBlackDark + return UIColor.flatBlackDark() } public func FlatBlueDark() -> UIColor { - return UIColor.flatBlueDark + return UIColor.flatBlueDark() } public func FlatBrownDark() -> UIColor { - return UIColor.flatBrownDark + return UIColor.flatBrownDark() } public func FlatCoffeeDark() -> UIColor { - return UIColor.flatCoffeeDark + return UIColor.flatCoffeeDark() } public func FlatForestGreenDark() -> UIColor { - return UIColor.flatForestGreenDark + return UIColor.flatForestGreenDark() } public func FlatGrayDark() -> UIColor { - return UIColor.flatGrayDark + return UIColor.flatGrayDark() } public func FlatGreenDark() -> UIColor { - return UIColor.flatGreenDark + return UIColor.flatGreenDark() } public func FlatLimeDark() -> UIColor { - return UIColor.flatLimeDark + return UIColor.flatLimeDark() } public func FlatMagentaDark() -> UIColor { - return UIColor.flatMagentaDark + return UIColor.flatMagentaDark() } public func FlatMaroonDark() -> UIColor { - return UIColor.flatMaroonDark + return UIColor.flatMaroonDark() } public func FlatMintDark() -> UIColor { - return UIColor.flatMintDark + return UIColor.flatMintDark() } public func FlatNavyBlueDark() -> UIColor { - return UIColor.flatNavyBlueDark + return UIColor.flatNavyBlueDark() } public func FlatOrangeDark() -> UIColor { - return UIColor.flatOrangeDark + return UIColor.flatOrangeDark() } public func FlatPinkDark() -> UIColor { - return UIColor.flatPinkDark + return UIColor.flatPinkDark() } public func FlatPlumDark() -> UIColor { - return UIColor.flatPlumDark + return UIColor.flatPlumDark() } public func FlatPowderBlueDark() -> UIColor { - return UIColor.flatPowderBlueDark + return UIColor.flatPowderBlueDark() } public func FlatPurpleDark() -> UIColor { - return UIColor.flatPurpleDark + return UIColor.flatPurpleDark() } public func FlatRedDark() -> UIColor { - return UIColor.flatRedDark + return UIColor.flatRedDark() } public func FlatSandDark() -> UIColor { - return UIColor.flatSandDark + return UIColor.flatSandDark() } public func FlatSkyBlueDark() -> UIColor { - return UIColor.flatSkyBlueDark + return UIColor.flatSkyBlueDark() } public func FlatTealDark() -> UIColor { - return UIColor.flatTealDark + return UIColor.flatTealDark() } public func FlatWatermelonDark() -> UIColor { - return UIColor.flatWatermelonDark + return UIColor.flatWatermelonDark() } public func FlatWhiteDark() -> UIColor { - return UIColor.flatWhiteDark + return UIColor.flatWhiteDark() } public func FlatYellowDark() -> UIColor { - return UIColor.flatYellowDark + return UIColor.flatYellowDark() }