Skip to content
This repository has been archived by the owner on Jun 13, 2021. It is now read-only.

making the project works on Xcode 10.2 with Swift 5.0 #237

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 16 additions & 8 deletions Chameleon.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0900;
LastUpgradeCheck = 0900;
LastUpgradeCheck = 1020;
ORGANIZATIONNAME = "Vicc Alexander";
TargetAttributes = {
0C8DABB01C07B5EA00B28FE2 = {
Expand All @@ -411,7 +411,7 @@
};
buildConfigurationList = 240093F21BB4517400932727 /* Build configuration list for PBXProject "Chameleon" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
Expand Down Expand Up @@ -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;
Expand All @@ -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;
Expand Down Expand Up @@ -660,6 +663,7 @@
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
Expand All @@ -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;
Expand All @@ -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;
Expand All @@ -709,6 +716,7 @@
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
VERSIONING_SYSTEM = "apple-generic";
Expand All @@ -734,7 +742,7 @@
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 3.0;
SWIFT_VERSION = 5.0;
};
name = Debug;
};
Expand All @@ -755,7 +763,7 @@
PRODUCT_BUNDLE_IDENTIFIER = com.viccalexander.Chameleon;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
SWIFT_VERSION = 3.0;
SWIFT_VERSION = 5.0;
};
name = Release;
};
Expand All @@ -780,7 +788,7 @@
PRODUCT_BUNDLE_IDENTIFIER = "com.viccalexander.ChameleonDemo-Swift";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_VERSION = 3.0;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
Expand All @@ -805,7 +813,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 = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Release;
Expand All @@ -819,7 +827,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 = 5.0;
};
name = Debug;
};
Expand All @@ -832,7 +840,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 = 5.0;
};
name = Release;
};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0900"
LastUpgradeVersion = "1020"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand All @@ -26,7 +26,6 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
Expand All @@ -37,7 +36,6 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
Expand Down
3 changes: 1 addition & 2 deletions ChameleonDemo-Swift/AppDelegate.swift
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,9 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?


func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool {
return true
}


}

Empty file.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified ChameleonDemo-Swift/Assets.xcassets/Contents.json
100644 → 100755
Empty file.
Empty file.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file.
Empty file modified ChameleonDemo-Swift/Assets.xcassets/first.imageset/first.pdf
100644 → 100755
Empty file.
Empty file modified ChameleonDemo-Swift/Assets.xcassets/logo.imageset/Contents.json
100644 → 100755
Empty file.
Empty file modified ChameleonDemo-Swift/Assets.xcassets/logo.imageset/logo@2x.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file.
Empty file modified ChameleonDemo-Swift/Assets.xcassets/second.imageset/second.pdf
100644 → 100755
Empty file.
Empty file modified ChameleonDemo-Swift/Base.lproj/LaunchScreen.storyboard
100644 → 100755
Empty file.
Empty file modified ChameleonDemo-Swift/Base.lproj/Main.storyboard
100644 → 100755
Empty file.
4 changes: 2 additions & 2 deletions ChameleonDemo-Swift/FirstViewController.swift
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [NSAttributedString.Key.foregroundColor: randomFlatColorContract]
// Tab bar
tabBarController?.tabBar.barTintColor = randomFlatColor
tabBarController?.tabBar.tintColor = randomFlatColorContract
Expand Down Expand Up @@ -119,7 +119,7 @@ class FirstViewController: UITableViewController {
let green = Float(arc4random_uniform(256))/255.0
let blue = Float(arc4random_uniform(256))/255.0

return UIColor(colorLiteralRed: red, green: green, blue: blue, alpha: 1.0)
return UIColor(_colorLiteralRed: red, green: green, blue: blue, alpha: 1.0)
}
}

Expand Down
Empty file modified ChameleonDemo-Swift/Info.plist
100644 → 100755
Empty file.
4 changes: 2 additions & 2 deletions ChameleonDemo-Swift/SecondViewController.swift
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class SecondViewController: UITableViewController {

override func viewDidLoad() {
super.viewDidLoad()
navigationController?.navigationBar.titleTextAttributes = [NSForegroundColorAttributeName: tabBarController?.tabBar.tintColor ?? UIColor.gray]
navigationController?.navigationBar.titleTextAttributes = [NSAttributedString.Key.foregroundColor: tabBarController?.tabBar.tintColor ?? UIColor.gray]
navigationController?.navigationBar.barTintColor = tabBarController?.tabBar.barTintColor ?? UIColor.lightGray
sampleOneImageView.image = #imageLiteral(resourceName: "SampleImageOne")
sampleTwoImageView.image = #imageLiteral(resourceName: "SampleImageTwo")
Expand All @@ -54,7 +54,7 @@ class SecondViewController: UITableViewController {
}

override func viewWillAppear(_ animated: Bool) {
navigationController?.navigationBar.titleTextAttributes = [NSForegroundColorAttributeName: tabBarController?.tabBar.tintColor ?? UIColor.gray]
navigationController?.navigationBar.titleTextAttributes = [NSAttributedString.Key.foregroundColor: tabBarController?.tabBar.tintColor ?? UIColor.gray]
navigationController?.navigationBar.barTintColor = tabBarController?.tabBar.barTintColor ?? UIColor.lightGray
}

Expand Down
2 changes: 1 addition & 1 deletion ChameleonDemo/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {

var window: UIWindow?

public func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey : Any]? = nil) -> Bool {
public func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool {

Chameleon.setGlobalThemeUsingPrimaryColor(.flatPlum,
withSecondaryColor: .flatBlue,
Expand Down
Empty file modified Extras/Chameleon.clr
100644 → 100755
Empty file.
Empty file modified Extras/Chameleon.sketchpalette
100644 → 100755
Empty file.
Empty file modified Extras/Chameleon_Photoshop.aco
100644 → 100755
Empty file.
Empty file modified Extras/Chameleon_v2.clr
100644 → 100755
Empty file.
2 changes: 2 additions & 0 deletions Pod/Classes/Objective-C/UIColor+Chameleon.m
Original file line number Diff line number Diff line change
Expand Up @@ -950,6 +950,8 @@ - (void)getRGBAComponents:(CGFloat[4])rgba {
rgba[3] = 1.0f;
break;
}

default: break;
}
}

Expand Down
Empty file modified README.md
100644 → 100755
Empty file.