From 69103aaacc953901a220a5243a7065762eb9ebba Mon Sep 17 00:00:00 2001 From: Marius Landwehr Date: Mon, 26 Dec 2016 11:15:14 +0100 Subject: [PATCH 01/31] First transition for Swift 3.0 with complete rewrite --- Classes/HexColors.swift | 137 +++++ HexColors-iOS/HexColors-iOS.h | 19 + HexColors-iOS/Info.plist | 24 + HexColors-iOSTests/HexColors_iOSTests.swift | 36 ++ HexColors-iOSTests/Info.plist | 22 + HexColors-macOS/HexColors-macOS.h | 19 + HexColors-macOS/Info.plist | 26 + .../HexColors_macOSTests.swift | 36 ++ HexColors-macOSTests/Info.plist | 22 + HexColors.xcodeproj/project.pbxproj | 487 +++++++++++------- 10 files changed, 648 insertions(+), 180 deletions(-) create mode 100644 Classes/HexColors.swift create mode 100644 HexColors-iOS/HexColors-iOS.h create mode 100644 HexColors-iOS/Info.plist create mode 100644 HexColors-iOSTests/HexColors_iOSTests.swift create mode 100644 HexColors-iOSTests/Info.plist create mode 100644 HexColors-macOS/HexColors-macOS.h create mode 100644 HexColors-macOS/Info.plist create mode 100644 HexColors-macOSTests/HexColors_macOSTests.swift create mode 100644 HexColors-macOSTests/Info.plist diff --git a/Classes/HexColors.swift b/Classes/HexColors.swift new file mode 100644 index 0000000..f6f91f5 --- /dev/null +++ b/Classes/HexColors.swift @@ -0,0 +1,137 @@ +// +// HexColors.swift +// +// Created by Marius Landwehr on 25.12.16. +// The MIT License (MIT) +// Copyright (c) 2016 Marius Landwehr marius.landwehr@gmail.com +// +// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// + +#if os(iOS) + import UIKit + public typealias HexColor = UIColor +#else + import Cocoa + public typealias HexColor = NSColor +#endif + +public extension HexColor { + typealias HexString = String + + convenience init?(hex string: HexString, alpha: CGFloat? = nil) { + + guard + let hexType = Type(from: string), + let components = hexType.components() else { + return nil + } + + #if os(iOS) + self.init(red: components.red, green: components.green, blue: components.blue, alpha: alpha ?? components.alpha) + #else + self.init(calibratedRed: components.red, green: components.green, blue: components.blue, alpha: alpha ?? components.alpha) + #endif + } + + fileprivate enum `Type` { + + case RGBshort(rgb: HexString) + case RGBshortAlpha(rgba: HexString) + case RGB(rgb: HexString) + case RGBA(rgba: HexString) + + init?(from hex: HexString) { + + var hexString = hex + hexString.removeHashIfNecessary() + + guard let t = Type.transform(hex: hexString) else { + return nil + } + + self = t + } + + static func transform(hex string: HexString) -> Type? { + switch string.characters.count { + case 3: + return .RGBshort(rgb: string) + case 4: + return .RGBshortAlpha(rgba: string) + case 6: + return .RGB(rgb: string) + case 8: + return .RGBA(rgba: string) + default: + return nil + } + } + + var value: HexString { + switch self { + case .RGBshort(let rgb): + return rgb + case .RGBshortAlpha(let rgba): + return rgba + case .RGB(let rgb): + return rgb + case .RGBA(let rgba): + return rgba + } + } + + typealias rgbComponents = (red: CGFloat, green: CGFloat, blue: CGFloat, alpha: CGFloat) + func components() -> rgbComponents? { + + var hexValue: UInt32 = 0 + guard Scanner(string: value).scanHexInt32(&hexValue) else { + return nil + } + + let r, g, b, a, divisor: CGFloat + + switch self { + case .RGBshort(_): + divisor = 15 + r = CGFloat((hexValue & 0xF00) >> 8) / divisor + g = CGFloat((hexValue & 0x0F0) >> 4) / divisor + b = CGFloat( hexValue & 0x00F) / divisor + a = 1 + case .RGBshortAlpha(_): + divisor = 15 + r = CGFloat((hexValue & 0xF000) >> 12) / divisor + g = CGFloat((hexValue & 0x0F00) >> 8) / divisor + b = CGFloat((hexValue & 0x00F0) >> 4) / divisor + a = CGFloat( hexValue & 0x000F) / divisor + case .RGB(_): + divisor = 255 + r = CGFloat((hexValue & 0xFF0000) >> 16) / divisor + g = CGFloat((hexValue & 0x00FF00) >> 8) / divisor + b = CGFloat( hexValue & 0x0000FF) / divisor + a = 1 + case .RGBA(_): + divisor = 255 + r = CGFloat((hexValue & 0xFF000000) >> 24) / divisor + g = CGFloat((hexValue & 0x00FF0000) >> 16) / divisor + b = CGFloat((hexValue & 0x0000FF00) >> 8) / divisor + a = CGFloat( hexValue & 0x000000FF) / divisor + } + + return (red: r, green: g, blue: b, alpha: a) + } + } +} + +fileprivate extension String { + + mutating func removeHashIfNecessary() { + if hasPrefix("#") { + self = replacingOccurrences(of: "#", with: "") + } + } +} diff --git a/HexColors-iOS/HexColors-iOS.h b/HexColors-iOS/HexColors-iOS.h new file mode 100644 index 0000000..c29f71a --- /dev/null +++ b/HexColors-iOS/HexColors-iOS.h @@ -0,0 +1,19 @@ +// +// HexColors-iOS.h +// HexColors-iOS +// +// Created by Marius Landwehr on 26.12.16. +// Copyright © 2016 Marius Landwehr. All rights reserved. +// + +#import + +//! Project version number for HexColors-iOS. +FOUNDATION_EXPORT double HexColors_iOSVersionNumber; + +//! Project version string for HexColors-iOS. +FOUNDATION_EXPORT const unsigned char HexColors_iOSVersionString[]; + +// In this header, you should import all the public headers of your framework using statements like #import + + diff --git a/HexColors-iOS/Info.plist b/HexColors-iOS/Info.plist new file mode 100644 index 0000000..935a9e9 --- /dev/null +++ b/HexColors-iOS/Info.plist @@ -0,0 +1,24 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + HexColors + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleVersion + $(CURRENT_PROJECT_VERSION) + NSPrincipalClass + + + diff --git a/HexColors-iOSTests/HexColors_iOSTests.swift b/HexColors-iOSTests/HexColors_iOSTests.swift new file mode 100644 index 0000000..8e3db28 --- /dev/null +++ b/HexColors-iOSTests/HexColors_iOSTests.swift @@ -0,0 +1,36 @@ +// +// HexColors_iOSTests.swift +// HexColors-iOSTests +// +// Created by Marius Landwehr on 26.12.16. +// Copyright © 2016 Marius Landwehr. All rights reserved. +// + +import XCTest +@testable import HexColors_iOS + +class HexColors_iOSTests: XCTestCase { + + override func setUp() { + super.setUp() + // Put setup code here. This method is called before the invocation of each test method in the class. + } + + override func tearDown() { + // Put teardown code here. This method is called after the invocation of each test method in the class. + super.tearDown() + } + + func testExample() { + // This is an example of a functional test case. + // Use XCTAssert and related functions to verify your tests produce the correct results. + } + + func testPerformanceExample() { + // This is an example of a performance test case. + self.measure { + // Put the code you want to measure the time of here. + } + } + +} diff --git a/HexColors-iOSTests/Info.plist b/HexColors-iOSTests/Info.plist new file mode 100644 index 0000000..6c6c23c --- /dev/null +++ b/HexColors-iOSTests/Info.plist @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + + diff --git a/HexColors-macOS/HexColors-macOS.h b/HexColors-macOS/HexColors-macOS.h new file mode 100644 index 0000000..439c048 --- /dev/null +++ b/HexColors-macOS/HexColors-macOS.h @@ -0,0 +1,19 @@ +// +// HexColors-macOS.h +// HexColors-macOS +// +// Created by Marius Landwehr on 26.12.16. +// Copyright © 2016 Marius Landwehr. All rights reserved. +// + +#import + +//! Project version number for HexColors-macOS. +FOUNDATION_EXPORT double HexColors_macOSVersionNumber; + +//! Project version string for HexColors-macOS. +FOUNDATION_EXPORT const unsigned char HexColors_macOSVersionString[]; + +// In this header, you should import all the public headers of your framework using statements like #import + + diff --git a/HexColors-macOS/Info.plist b/HexColors-macOS/Info.plist new file mode 100644 index 0000000..3407e82 --- /dev/null +++ b/HexColors-macOS/Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + HexColors + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleVersion + $(CURRENT_PROJECT_VERSION) + NSHumanReadableCopyright + Copyright © 2016 Marius Landwehr. All rights reserved. + NSPrincipalClass + + + diff --git a/HexColors-macOSTests/HexColors_macOSTests.swift b/HexColors-macOSTests/HexColors_macOSTests.swift new file mode 100644 index 0000000..2641138 --- /dev/null +++ b/HexColors-macOSTests/HexColors_macOSTests.swift @@ -0,0 +1,36 @@ +// +// HexColors_macOSTests.swift +// HexColors-macOSTests +// +// Created by Marius Landwehr on 26.12.16. +// Copyright © 2016 Marius Landwehr. All rights reserved. +// + +import XCTest +@testable import HexColors_macOS + +class HexColors_macOSTests: XCTestCase { + + override func setUp() { + super.setUp() + // Put setup code here. This method is called before the invocation of each test method in the class. + } + + override func tearDown() { + // Put teardown code here. This method is called after the invocation of each test method in the class. + super.tearDown() + } + + func testExample() { + // This is an example of a functional test case. + // Use XCTAssert and related functions to verify your tests produce the correct results. + } + + func testPerformanceExample() { + // This is an example of a performance test case. + self.measure { + // Put the code you want to measure the time of here. + } + } + +} diff --git a/HexColors-macOSTests/Info.plist b/HexColors-macOSTests/Info.plist new file mode 100644 index 0000000..6c6c23c --- /dev/null +++ b/HexColors-macOSTests/Info.plist @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + + diff --git a/HexColors.xcodeproj/project.pbxproj b/HexColors.xcodeproj/project.pbxproj index e4703fe..04a3f83 100644 --- a/HexColors.xcodeproj/project.pbxproj +++ b/HexColors.xcodeproj/project.pbxproj @@ -7,265 +7,316 @@ objects = { /* Begin PBXBuildFile section */ - 2DACED241A794E1B00FEC3CE /* HexColors.h in Headers */ = {isa = PBXBuildFile; fileRef = 2DACED221A794E1B00FEC3CE /* HexColors.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 2DACED251A794E1B00FEC3CE /* HexColors.h in Headers */ = {isa = PBXBuildFile; fileRef = 2DACED221A794E1B00FEC3CE /* HexColors.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 2DACED261A794E1B00FEC3CE /* HexColors.m in Sources */ = {isa = PBXBuildFile; fileRef = 2DACED231A794E1B00FEC3CE /* HexColors.m */; }; - 2DACED271A794E1B00FEC3CE /* HexColors.m in Sources */ = {isa = PBXBuildFile; fileRef = 2DACED231A794E1B00FEC3CE /* HexColors.m */; }; - 8EB8367F1C46E8A80008E218 /* HexColorsTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 8EB8367E1C46E8A80008E218 /* HexColorsTests.m */; }; - 8EB836811C46E8A80008E218 /* HexColors.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2DACECA91A794CD800FEC3CE /* HexColors.framework */; }; - 8EB836871C46E9830008E218 /* HexColors.m in Sources */ = {isa = PBXBuildFile; fileRef = 2DACED231A794E1B00FEC3CE /* HexColors.m */; }; + 293AB3451E111F0B004A4946 /* HexColors.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 293AB33C1E111F0B004A4946 /* HexColors.framework */; }; + 293AB34A1E111F0B004A4946 /* HexColors_iOSTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 293AB3491E111F0B004A4946 /* HexColors_iOSTests.swift */; }; + 293AB34C1E111F0B004A4946 /* HexColors-iOS.h in Headers */ = {isa = PBXBuildFile; fileRef = 293AB33E1E111F0B004A4946 /* HexColors-iOS.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 293AB3531E111F20004A4946 /* HexColors.swift in Sources */ = {isa = PBXBuildFile; fileRef = 293AB3341E111E88004A4946 /* HexColors.swift */; }; + 293AB3621E111F53004A4946 /* HexColors.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 293AB3591E111F53004A4946 /* HexColors.framework */; }; + 293AB3671E111F53004A4946 /* HexColors_macOSTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 293AB3661E111F53004A4946 /* HexColors_macOSTests.swift */; }; + 293AB3691E111F53004A4946 /* HexColors-macOS.h in Headers */ = {isa = PBXBuildFile; fileRef = 293AB35B1E111F53004A4946 /* HexColors-macOS.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 293AB3701E111F5A004A4946 /* HexColors.swift in Sources */ = {isa = PBXBuildFile; fileRef = 293AB3341E111E88004A4946 /* HexColors.swift */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ - 8EB836821C46E8A80008E218 /* PBXContainerItemProxy */ = { + 293AB3461E111F0B004A4946 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; - containerPortal = 2DACECA01A794CD800FEC3CE /* Project object */; + containerPortal = 293AB3171E111E68004A4946 /* Project object */; proxyType = 1; - remoteGlobalIDString = 2DACECA81A794CD800FEC3CE; - remoteInfo = HexColors; + remoteGlobalIDString = 293AB33B1E111F0B004A4946; + remoteInfo = "HexColors-iOS"; + }; + 293AB3631E111F53004A4946 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 293AB3171E111E68004A4946 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 293AB3581E111F53004A4946; + remoteInfo = "HexColors-macOS"; }; /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ - 2DACECA91A794CD800FEC3CE /* HexColors.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = HexColors.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 2DACECAD1A794CD800FEC3CE /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 2DACED081A794E0500FEC3CE /* HexColorsOSX.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = HexColorsOSX.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 2DACED0B1A794E0500FEC3CE /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 2DACED221A794E1B00FEC3CE /* HexColors.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HexColors.h; sourceTree = ""; }; - 2DACED231A794E1B00FEC3CE /* HexColors.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HexColors.m; sourceTree = ""; }; - 8EB8367C1C46E8A80008E218 /* HexColorsTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = HexColorsTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - 8EB8367E1C46E8A80008E218 /* HexColorsTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HexColorsTests.m; sourceTree = ""; }; - 8EB836801C46E8A80008E218 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 293AB3341E111E88004A4946 /* HexColors.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = HexColors.swift; path = Classes/HexColors.swift; sourceTree = ""; }; + 293AB33C1E111F0B004A4946 /* HexColors.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = HexColors.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 293AB33E1E111F0B004A4946 /* HexColors-iOS.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "HexColors-iOS.h"; sourceTree = ""; }; + 293AB33F1E111F0B004A4946 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 293AB3441E111F0B004A4946 /* HexColors-iOSTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "HexColors-iOSTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; + 293AB3491E111F0B004A4946 /* HexColors_iOSTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HexColors_iOSTests.swift; sourceTree = ""; }; + 293AB34B1E111F0B004A4946 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 293AB3591E111F53004A4946 /* HexColors.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = HexColors.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 293AB35B1E111F53004A4946 /* HexColors-macOS.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "HexColors-macOS.h"; sourceTree = ""; }; + 293AB35C1E111F53004A4946 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 293AB3611E111F53004A4946 /* HexColors-macOSTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "HexColors-macOSTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; + 293AB3661E111F53004A4946 /* HexColors_macOSTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HexColors_macOSTests.swift; sourceTree = ""; }; + 293AB3681E111F53004A4946 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ - 2DACECA51A794CD800FEC3CE /* Frameworks */ = { + 293AB3381E111F0B004A4946 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; - 2DACED041A794E0500FEC3CE /* Frameworks */ = { + 293AB3411E111F0B004A4946 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 293AB3451E111F0B004A4946 /* HexColors.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; - 8EB836791C46E8A80008E218 /* Frameworks */ = { + 293AB3551E111F53004A4946 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 8EB836811C46E8A80008E218 /* HexColors.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 293AB35E1E111F53004A4946 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 293AB3621E111F53004A4946 /* HexColors.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - 2DACEC9F1A794CD800FEC3CE = { + 293AB3161E111E68004A4946 = { isa = PBXGroup; children = ( - 2DACED211A794E1B00FEC3CE /* Classes */, - 2DACECAB1A794CD800FEC3CE /* HexColors */, - 2DACED091A794E0500FEC3CE /* HexColorsOSX */, - 8EB8367D1C46E8A80008E218 /* HexColorsTests */, - 2DACECAA1A794CD800FEC3CE /* Products */, + 293AB3361E111E96004A4946 /* Classes */, + 293AB33D1E111F0B004A4946 /* HexColors-iOS */, + 293AB3481E111F0B004A4946 /* HexColors-iOSTests */, + 293AB35A1E111F53004A4946 /* HexColors-macOS */, + 293AB3651E111F53004A4946 /* HexColors-macOSTests */, + 293AB3201E111E68004A4946 /* Products */, ); sourceTree = ""; }; - 2DACECAA1A794CD800FEC3CE /* Products */ = { + 293AB3201E111E68004A4946 /* Products */ = { isa = PBXGroup; children = ( - 2DACECA91A794CD800FEC3CE /* HexColors.framework */, - 2DACED081A794E0500FEC3CE /* HexColorsOSX.framework */, - 8EB8367C1C46E8A80008E218 /* HexColorsTests.xctest */, + 293AB33C1E111F0B004A4946 /* HexColors.framework */, + 293AB3441E111F0B004A4946 /* HexColors-iOSTests.xctest */, + 293AB3591E111F53004A4946 /* HexColors.framework */, + 293AB3611E111F53004A4946 /* HexColors-macOSTests.xctest */, ); name = Products; sourceTree = ""; }; - 2DACECAB1A794CD800FEC3CE /* HexColors */ = { - isa = PBXGroup; - children = ( - 2DACECAC1A794CD800FEC3CE /* Supporting Files */, - ); - path = HexColors; - sourceTree = ""; - }; - 2DACECAC1A794CD800FEC3CE /* Supporting Files */ = { + 293AB3361E111E96004A4946 /* Classes */ = { isa = PBXGroup; children = ( - 2DACECAD1A794CD800FEC3CE /* Info.plist */, + 293AB3341E111E88004A4946 /* HexColors.swift */, ); - name = "Supporting Files"; + name = Classes; sourceTree = ""; }; - 2DACED091A794E0500FEC3CE /* HexColorsOSX */ = { + 293AB33D1E111F0B004A4946 /* HexColors-iOS */ = { isa = PBXGroup; children = ( - 2DACED0A1A794E0500FEC3CE /* Supporting Files */, + 293AB33E1E111F0B004A4946 /* HexColors-iOS.h */, + 293AB33F1E111F0B004A4946 /* Info.plist */, ); - path = HexColorsOSX; + path = "HexColors-iOS"; sourceTree = ""; }; - 2DACED0A1A794E0500FEC3CE /* Supporting Files */ = { + 293AB3481E111F0B004A4946 /* HexColors-iOSTests */ = { isa = PBXGroup; children = ( - 2DACED0B1A794E0500FEC3CE /* Info.plist */, + 293AB3491E111F0B004A4946 /* HexColors_iOSTests.swift */, + 293AB34B1E111F0B004A4946 /* Info.plist */, ); - name = "Supporting Files"; + path = "HexColors-iOSTests"; sourceTree = ""; }; - 2DACED211A794E1B00FEC3CE /* Classes */ = { + 293AB35A1E111F53004A4946 /* HexColors-macOS */ = { isa = PBXGroup; children = ( - 2DACED221A794E1B00FEC3CE /* HexColors.h */, - 2DACED231A794E1B00FEC3CE /* HexColors.m */, + 293AB35B1E111F53004A4946 /* HexColors-macOS.h */, + 293AB35C1E111F53004A4946 /* Info.plist */, ); - path = Classes; + path = "HexColors-macOS"; sourceTree = ""; }; - 8EB8367D1C46E8A80008E218 /* HexColorsTests */ = { + 293AB3651E111F53004A4946 /* HexColors-macOSTests */ = { isa = PBXGroup; children = ( - 8EB8367E1C46E8A80008E218 /* HexColorsTests.m */, - 8EB836801C46E8A80008E218 /* Info.plist */, + 293AB3661E111F53004A4946 /* HexColors_macOSTests.swift */, + 293AB3681E111F53004A4946 /* Info.plist */, ); - path = HexColorsTests; + path = "HexColors-macOSTests"; sourceTree = ""; }; /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ - 2DACECA61A794CD800FEC3CE /* Headers */ = { + 293AB3391E111F0B004A4946 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - 2DACED241A794E1B00FEC3CE /* HexColors.h in Headers */, + 293AB34C1E111F0B004A4946 /* HexColors-iOS.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; - 2DACED051A794E0500FEC3CE /* Headers */ = { + 293AB3561E111F53004A4946 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - 2DACED251A794E1B00FEC3CE /* HexColors.h in Headers */, + 293AB3691E111F53004A4946 /* HexColors-macOS.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXHeadersBuildPhase section */ /* Begin PBXNativeTarget section */ - 2DACECA81A794CD800FEC3CE /* HexColors */ = { + 293AB33B1E111F0B004A4946 /* HexColors-iOS */ = { isa = PBXNativeTarget; - buildConfigurationList = 2DACECBF1A794CD800FEC3CE /* Build configuration list for PBXNativeTarget "HexColors" */; + buildConfigurationList = 293AB34D1E111F0B004A4946 /* Build configuration list for PBXNativeTarget "HexColors-iOS" */; buildPhases = ( - 2DACECA41A794CD800FEC3CE /* Sources */, - 2DACECA51A794CD800FEC3CE /* Frameworks */, - 2DACECA61A794CD800FEC3CE /* Headers */, - 2DACECA71A794CD800FEC3CE /* Resources */, + 293AB3371E111F0B004A4946 /* Sources */, + 293AB3381E111F0B004A4946 /* Frameworks */, + 293AB3391E111F0B004A4946 /* Headers */, + 293AB33A1E111F0B004A4946 /* Resources */, ); buildRules = ( ); dependencies = ( ); - name = HexColors; - productName = HexColors; - productReference = 2DACECA91A794CD800FEC3CE /* HexColors.framework */; + name = "HexColors-iOS"; + productName = "HexColors-iOS"; + productReference = 293AB33C1E111F0B004A4946 /* HexColors.framework */; productType = "com.apple.product-type.framework"; }; - 2DACED071A794E0500FEC3CE /* HexColorsOSX */ = { + 293AB3431E111F0B004A4946 /* HexColors-iOSTests */ = { isa = PBXNativeTarget; - buildConfigurationList = 2DACED1B1A794E0500FEC3CE /* Build configuration list for PBXNativeTarget "HexColorsOSX" */; + buildConfigurationList = 293AB3501E111F0B004A4946 /* Build configuration list for PBXNativeTarget "HexColors-iOSTests" */; buildPhases = ( - 2DACED031A794E0500FEC3CE /* Sources */, - 2DACED041A794E0500FEC3CE /* Frameworks */, - 2DACED051A794E0500FEC3CE /* Headers */, - 2DACED061A794E0500FEC3CE /* Resources */, + 293AB3401E111F0B004A4946 /* Sources */, + 293AB3411E111F0B004A4946 /* Frameworks */, + 293AB3421E111F0B004A4946 /* Resources */, ); buildRules = ( ); dependencies = ( + 293AB3471E111F0B004A4946 /* PBXTargetDependency */, ); - name = HexColorsOSX; - productName = HexColorsOSX; - productReference = 2DACED081A794E0500FEC3CE /* HexColorsOSX.framework */; + name = "HexColors-iOSTests"; + productName = "HexColors-iOSTests"; + productReference = 293AB3441E111F0B004A4946 /* HexColors-iOSTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + 293AB3581E111F53004A4946 /* HexColors-macOS */ = { + isa = PBXNativeTarget; + buildConfigurationList = 293AB36A1E111F53004A4946 /* Build configuration list for PBXNativeTarget "HexColors-macOS" */; + buildPhases = ( + 293AB3541E111F53004A4946 /* Sources */, + 293AB3551E111F53004A4946 /* Frameworks */, + 293AB3561E111F53004A4946 /* Headers */, + 293AB3571E111F53004A4946 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "HexColors-macOS"; + productName = "HexColors-macOS"; + productReference = 293AB3591E111F53004A4946 /* HexColors.framework */; productType = "com.apple.product-type.framework"; }; - 8EB8367B1C46E8A80008E218 /* HexColorsTests */ = { + 293AB3601E111F53004A4946 /* HexColors-macOSTests */ = { isa = PBXNativeTarget; - buildConfigurationList = 8EB836861C46E8A80008E218 /* Build configuration list for PBXNativeTarget "HexColorsTests" */; + buildConfigurationList = 293AB36D1E111F53004A4946 /* Build configuration list for PBXNativeTarget "HexColors-macOSTests" */; buildPhases = ( - 8EB836781C46E8A80008E218 /* Sources */, - 8EB836791C46E8A80008E218 /* Frameworks */, - 8EB8367A1C46E8A80008E218 /* Resources */, + 293AB35D1E111F53004A4946 /* Sources */, + 293AB35E1E111F53004A4946 /* Frameworks */, + 293AB35F1E111F53004A4946 /* Resources */, ); buildRules = ( ); dependencies = ( - 8EB836831C46E8A80008E218 /* PBXTargetDependency */, + 293AB3641E111F53004A4946 /* PBXTargetDependency */, ); - name = HexColorsTests; - productName = HexColorsTests; - productReference = 8EB8367C1C46E8A80008E218 /* HexColorsTests.xctest */; + name = "HexColors-macOSTests"; + productName = "HexColors-macOSTests"; + productReference = 293AB3611E111F53004A4946 /* HexColors-macOSTests.xctest */; productType = "com.apple.product-type.bundle.unit-test"; }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ - 2DACECA01A794CD800FEC3CE /* Project object */ = { + 293AB3171E111E68004A4946 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0610; - ORGANIZATIONNAME = Reversebox; + LastSwiftUpdateCheck = 0820; + LastUpgradeCheck = 0820; + ORGANIZATIONNAME = "Marius Landwehr"; TargetAttributes = { - 2DACECA81A794CD800FEC3CE = { - CreatedOnToolsVersion = 6.1.1; + 293AB33B1E111F0B004A4946 = { + CreatedOnToolsVersion = 8.2; + ProvisioningStyle = Automatic; }; - 2DACED071A794E0500FEC3CE = { - CreatedOnToolsVersion = 6.1.1; + 293AB3431E111F0B004A4946 = { + CreatedOnToolsVersion = 8.2; + ProvisioningStyle = Automatic; }; - 8EB8367B1C46E8A80008E218 = { - CreatedOnToolsVersion = 7.1.1; + 293AB3581E111F53004A4946 = { + CreatedOnToolsVersion = 8.2; + ProvisioningStyle = Automatic; + }; + 293AB3601E111F53004A4946 = { + CreatedOnToolsVersion = 8.2; + ProvisioningStyle = Automatic; }; }; }; - buildConfigurationList = 2DACECA31A794CD800FEC3CE /* Build configuration list for PBXProject "HexColors" */; + buildConfigurationList = 293AB31A1E111E68004A4946 /* Build configuration list for PBXProject "HexColors" */; compatibilityVersion = "Xcode 3.2"; developmentRegion = English; hasScannedForEncodings = 0; knownRegions = ( en, + Base, ); - mainGroup = 2DACEC9F1A794CD800FEC3CE; - productRefGroup = 2DACECAA1A794CD800FEC3CE /* Products */; + mainGroup = 293AB3161E111E68004A4946; + productRefGroup = 293AB3201E111E68004A4946 /* Products */; projectDirPath = ""; projectRoot = ""; targets = ( - 2DACECA81A794CD800FEC3CE /* HexColors */, - 2DACED071A794E0500FEC3CE /* HexColorsOSX */, - 8EB8367B1C46E8A80008E218 /* HexColorsTests */, + 293AB33B1E111F0B004A4946 /* HexColors-iOS */, + 293AB3431E111F0B004A4946 /* HexColors-iOSTests */, + 293AB3581E111F53004A4946 /* HexColors-macOS */, + 293AB3601E111F53004A4946 /* HexColors-macOSTests */, ); }; /* End PBXProject section */ /* Begin PBXResourcesBuildPhase section */ - 2DACECA71A794CD800FEC3CE /* Resources */ = { + 293AB33A1E111F0B004A4946 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 293AB3421E111F0B004A4946 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; - 2DACED061A794E0500FEC3CE /* Resources */ = { + 293AB3571E111F53004A4946 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; - 8EB8367A1C46E8A80008E218 /* Resources */ = { + 293AB35F1E111F53004A4946 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( @@ -275,46 +326,59 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ - 2DACECA41A794CD800FEC3CE /* Sources */ = { + 293AB3371E111F0B004A4946 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 2DACED261A794E1B00FEC3CE /* HexColors.m in Sources */, + 293AB3531E111F20004A4946 /* HexColors.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; - 2DACED031A794E0500FEC3CE /* Sources */ = { + 293AB3401E111F0B004A4946 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 2DACED271A794E1B00FEC3CE /* HexColors.m in Sources */, + 293AB34A1E111F0B004A4946 /* HexColors_iOSTests.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; - 8EB836781C46E8A80008E218 /* Sources */ = { + 293AB3541E111F53004A4946 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 8EB836871C46E9830008E218 /* HexColors.m in Sources */, - 8EB8367F1C46E8A80008E218 /* HexColorsTests.m in Sources */, + 293AB3701E111F5A004A4946 /* HexColors.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 293AB35D1E111F53004A4946 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 293AB3671E111F53004A4946 /* HexColors_macOSTests.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ - 8EB836831C46E8A80008E218 /* PBXTargetDependency */ = { + 293AB3471E111F0B004A4946 /* PBXTargetDependency */ = { isa = PBXTargetDependency; - target = 2DACECA81A794CD800FEC3CE /* HexColors */; - targetProxy = 8EB836821C46E8A80008E218 /* PBXContainerItemProxy */; + target = 293AB33B1E111F0B004A4946 /* HexColors-iOS */; + targetProxy = 293AB3461E111F0B004A4946 /* PBXContainerItemProxy */; + }; + 293AB3641E111F53004A4946 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 293AB3581E111F53004A4946 /* HexColors-macOS */; + targetProxy = 293AB3631E111F53004A4946 /* PBXContainerItemProxy */; }; /* End PBXTargetDependency section */ /* Begin XCBuildConfiguration section */ - 2DACECBD1A794CD800FEC3CE /* Debug */ = { + 293AB32F1E111E68004A4946 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; @@ -322,44 +386,49 @@ CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 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"; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = ( "DEBUG=1", "$(inherited)", ); - GCC_SYMBOLS_PRIVATE_EXTERN = NO; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.1; + IPHONEOS_DEPLOYMENT_TARGET = 10.2; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; }; name = Debug; }; - 2DACECBE1A794CD800FEC3CE /* Release */ = { + 293AB3301E111E68004A4946 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; @@ -367,174 +436,232 @@ CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 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"; - COPY_PHASE_STRIP = YES; - CURRENT_PROJECT_VERSION = 1; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.1; + IPHONEOS_DEPLOYMENT_TARGET = 10.2; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; }; name = Release; }; - 2DACECC01A794CD800FEC3CE /* Debug */ = { + 293AB34E1E111F0B004A4946 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + CODE_SIGN_IDENTITY = ""; + CURRENT_PROJECT_VERSION = 1; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = HexColors/Info.plist; + INFOPLIST_FILE = "HexColors-iOS/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_NAME = "$(TARGET_NAME)"; + PRODUCT_BUNDLE_IDENTIFIER = "de.mariuslandwehr.HexColors-iOS"; + PRODUCT_NAME = HexColors; SKIP_INSTALL = YES; + SWIFT_VERSION = 3.0; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; }; name = Debug; }; - 2DACECC11A794CD800FEC3CE /* Release */ = { + 293AB34F1E111F0B004A4946 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + CODE_SIGN_IDENTITY = ""; + CURRENT_PROJECT_VERSION = 1; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = HexColors/Info.plist; + INFOPLIST_FILE = "HexColors-iOS/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_NAME = "$(TARGET_NAME)"; + PRODUCT_BUNDLE_IDENTIFIER = "de.mariuslandwehr.HexColors-iOS"; + PRODUCT_NAME = HexColors; SKIP_INSTALL = YES; + SWIFT_VERSION = 3.0; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + 293AB3511E111F0B004A4946 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + INFOPLIST_FILE = "HexColors-iOSTests/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "de.mariuslandwehr.HexColors-iOSTests"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 3.0; + }; + name = Debug; + }; + 293AB3521E111F0B004A4946 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + INFOPLIST_FILE = "HexColors-iOSTests/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "de.mariuslandwehr.HexColors-iOSTests"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 3.0; }; name = Release; }; - 2DACED1C1A794E0500FEC3CE /* Debug */ = { + 293AB36B1E111F53004A4946 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + CODE_SIGN_IDENTITY = "-"; COMBINE_HIDPI_IMAGES = YES; + CURRENT_PROJECT_VERSION = 1; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; FRAMEWORK_VERSION = A; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - INFOPLIST_FILE = HexColorsOSX/Info.plist; + INFOPLIST_FILE = "HexColors-macOS/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; - MACOSX_DEPLOYMENT_TARGET = 10.10; - PRODUCT_NAME = "$(TARGET_NAME)"; + MACOSX_DEPLOYMENT_TARGET = 10.9; + PRODUCT_BUNDLE_IDENTIFIER = "de.mariuslandwehr.HexColors-macOS"; + PRODUCT_NAME = HexColors; SDKROOT = macosx; SKIP_INSTALL = YES; + SWIFT_VERSION = 3.0; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; }; name = Debug; }; - 2DACED1D1A794E0500FEC3CE /* Release */ = { + 293AB36C1E111F53004A4946 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + CODE_SIGN_IDENTITY = "-"; COMBINE_HIDPI_IMAGES = YES; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + CURRENT_PROJECT_VERSION = 1; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; FRAMEWORK_VERSION = A; - INFOPLIST_FILE = HexColorsOSX/Info.plist; + INFOPLIST_FILE = "HexColors-macOS/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; - MACOSX_DEPLOYMENT_TARGET = 10.10; - PRODUCT_NAME = "$(TARGET_NAME)"; + MACOSX_DEPLOYMENT_TARGET = 10.9; + PRODUCT_BUNDLE_IDENTIFIER = "de.mariuslandwehr.HexColors-macOS"; + PRODUCT_NAME = HexColors; SDKROOT = macosx; SKIP_INSTALL = YES; + SWIFT_VERSION = 3.0; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; }; name = Release; }; - 8EB836841C46E8A80008E218 /* Debug */ = { + 293AB36E1E111F53004A4946 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_TESTABILITY = YES; - GCC_NO_COMMON_BLOCKS = YES; - INFOPLIST_FILE = HexColorsTests/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 9.1; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = de.MariusLandwehr.HexColorsTests; + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + CODE_SIGN_IDENTITY = "-"; + COMBINE_HIDPI_IMAGES = YES; + INFOPLIST_FILE = "HexColors-macOSTests/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; + MACOSX_DEPLOYMENT_TARGET = 10.12; + PRODUCT_BUNDLE_IDENTIFIER = "de.mariuslandwehr.HexColors-macOSTests"; PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = macosx; + SWIFT_VERSION = 3.0; }; name = Debug; }; - 8EB836851C46E8A80008E218 /* Release */ = { + 293AB36F1E111F53004A4946 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - GCC_NO_COMMON_BLOCKS = YES; - INFOPLIST_FILE = HexColorsTests/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 9.1; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = de.MariusLandwehr.HexColorsTests; + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + CODE_SIGN_IDENTITY = "-"; + COMBINE_HIDPI_IMAGES = YES; + INFOPLIST_FILE = "HexColors-macOSTests/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; + MACOSX_DEPLOYMENT_TARGET = 10.12; + PRODUCT_BUNDLE_IDENTIFIER = "de.mariuslandwehr.HexColors-macOSTests"; PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = macosx; + SWIFT_VERSION = 3.0; }; name = Release; }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ - 2DACECA31A794CD800FEC3CE /* Build configuration list for PBXProject "HexColors" */ = { + 293AB31A1E111E68004A4946 /* Build configuration list for PBXProject "HexColors" */ = { isa = XCConfigurationList; buildConfigurations = ( - 2DACECBD1A794CD800FEC3CE /* Debug */, - 2DACECBE1A794CD800FEC3CE /* Release */, + 293AB32F1E111E68004A4946 /* Debug */, + 293AB3301E111E68004A4946 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 2DACECBF1A794CD800FEC3CE /* Build configuration list for PBXNativeTarget "HexColors" */ = { + 293AB34D1E111F0B004A4946 /* Build configuration list for PBXNativeTarget "HexColors-iOS" */ = { isa = XCConfigurationList; buildConfigurations = ( - 2DACECC01A794CD800FEC3CE /* Debug */, - 2DACECC11A794CD800FEC3CE /* Release */, + 293AB34E1E111F0B004A4946 /* Debug */, + 293AB34F1E111F0B004A4946 /* Release */, ); defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; }; - 2DACED1B1A794E0500FEC3CE /* Build configuration list for PBXNativeTarget "HexColorsOSX" */ = { + 293AB3501E111F0B004A4946 /* Build configuration list for PBXNativeTarget "HexColors-iOSTests" */ = { isa = XCConfigurationList; buildConfigurations = ( - 2DACED1C1A794E0500FEC3CE /* Debug */, - 2DACED1D1A794E0500FEC3CE /* Release */, + 293AB3511E111F0B004A4946 /* Debug */, + 293AB3521E111F0B004A4946 /* Release */, + ); + defaultConfigurationIsVisible = 0; + }; + 293AB36A1E111F53004A4946 /* Build configuration list for PBXNativeTarget "HexColors-macOS" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 293AB36B1E111F53004A4946 /* Debug */, + 293AB36C1E111F53004A4946 /* Release */, ); defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; }; - 8EB836861C46E8A80008E218 /* Build configuration list for PBXNativeTarget "HexColorsTests" */ = { + 293AB36D1E111F53004A4946 /* Build configuration list for PBXNativeTarget "HexColors-macOSTests" */ = { isa = XCConfigurationList; buildConfigurations = ( - 8EB836841C46E8A80008E218 /* Debug */, - 8EB836851C46E8A80008E218 /* Release */, + 293AB36E1E111F53004A4946 /* Debug */, + 293AB36F1E111F53004A4946 /* Release */, ); defaultConfigurationIsVisible = 0; }; /* End XCConfigurationList section */ }; - rootObject = 2DACECA01A794CD800FEC3CE /* Project object */; + rootObject = 293AB3171E111E68004A4946 /* Project object */; } From ab31212b0f2eb7be343d72bb83901c11e8673005 Mon Sep 17 00:00:00 2001 From: Marius Landwehr Date: Mon, 26 Dec 2016 11:26:17 +0100 Subject: [PATCH 02/31] updated the readme file --- README.md | 50 +++++++++++++------------------------------------- 1 file changed, 13 insertions(+), 37 deletions(-) diff --git a/README.md b/README.md index 592aa37..cf45269 100644 --- a/README.md +++ b/README.md @@ -4,71 +4,47 @@ HexColors ![Badge w/ Version](https://travis-ci.org/mRs-/HexColors.svg) ![Badge w/ Version](https://cocoapod-badges.herokuapp.com/p/HexColors/badge.png) -HexColors is drop in category for HexColor Support for NSColor and UIColor. Support for HexColors with prefixed # and without. +HexColors is an extension for UIColor and NSColor to support for creating colors from a hex string like #FF0088 or 8844FF. Completely rewritten in Swift 3! -#RELEASE 3.0.0 -Popular request was to pre-fix the function calls because of better support of different libraries and dependencies. All functions are now prefixed with hx_ +If you want to use this in Objective-C jump to the 3.X version Tag. -#Example iOS -##objective-c## -``` objective-c -// with hash -UIColor *colorWithHex = [UIColor hx_colorWithHexString:@"#ff8942"]; - -// without hash -UIColor *secondColorWithHex = [UIColor hx_colorWithHexString:@"ff8942"]; +#RELEASE 4.0.0 +Completely rewritten in Swift 3 to get the real magic going on! -// short handling -UIColor *shortColorWithHex = [UIColor hx_colorWithHexString:@"fff"]; -``` -##swift## +#Example iOS ``` swift // with hash -let colorWithHex = UIColor.hx_colorWithHexString("#ff8942") +let colorWithHex = UIColor(hex: "#ff8942") // without hash -let secondColorWithHex = UIColor.hx_colorWithHexString("ff8942") +let secondColorWithHex = UIColor(hex: "ff8942") // short handling -let shortColorWithHex = UIColor.hx_colorWithHexString("fff") +let shortColorWithHex = UIColor(hex: "fff") ``` -#Example Mac OS X -``` objective-c -// with hash -NSColor *colorWithHex = [NSColor hx_colorWithHexString:@"#ff8942"]; - -// wihtout hash -NSColor *secondColorWithHex = [NSColor hx_colorWithHexString:@"ff8942"]; - -// short handling -NSColor *shortColorWithHex = [NSColor hx_colorWithHexString:@"fff"]; -``` -##swift## +#Example macOS ``` swift // with hash -let colorWithHex = NSColor.hx_colorWithHexString("#ff8942") +let colorWithHex = NSColor(hex: "#ff8942") // without hash -let secondColorWithHex = NSColor.hx_colorWithHexString("ff8942") +let secondColorWithHex = NSColor(hex: "ff8942") // short handling -let shortColorWithHex = NSColor.hx_colorWithHexString("fff") +let shortColorWithHex = NSColor(hex: "fff") ``` #Installation -* `#import "HexColors.h"` where you want to use easy as pie HexColors * `pod install HexColors` * or just drag the source files in your project ##Requirements -HexColors requires [iOS 5.0](http://developer.apple.com/library/ios/#releasenotes/General/WhatsNewIniPhoneOS/Articles/iPhoneOS4.html) and above, and Mac OS X 10.6 +HexColors requires **>= iOS 8.0** and **>=macOS 10.9**. ##Credits HexColors was created by [Marius Landwehr](https://github.com/mRs-) because of the pain recalculating Hex values to RGB. -HexColors was ported to Mac OS X by [holgersindbaek](https://github.com/holgersindbaek). - ##Creator [Marius Landwehr](https://github.com/mRs-) [@mariusLAN](https://twitter.com/mariusLAN) From a19e29241636795172580e2c22c7f7cc8c3365ba Mon Sep 17 00:00:00 2001 From: Marius Landwehr Date: Wed, 28 Dec 2016 13:41:14 +0100 Subject: [PATCH 03/31] Added watchOS and tvOS --- Classes/HexColors.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Classes/HexColors.swift b/Classes/HexColors.swift index f6f91f5..fe5c166 100644 --- a/Classes/HexColors.swift +++ b/Classes/HexColors.swift @@ -12,7 +12,7 @@ // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if os(iOS) +#if os(iOS) || os(watchOS) || os(tvOS) import UIKit public typealias HexColor = UIColor #else From e619d4379efbb036884868c577ff5e6efc3f0765 Mon Sep 17 00:00:00 2001 From: Marius Landwehr Date: Wed, 28 Dec 2016 13:42:05 +0100 Subject: [PATCH 04/31] Added computed property to get a hex string from HexColor --- Classes/HexColors.swift | 31 ++++++++++++++++++++++--------- 1 file changed, 22 insertions(+), 9 deletions(-) diff --git a/Classes/HexColors.swift b/Classes/HexColors.swift index fe5c166..5cb09c8 100644 --- a/Classes/HexColors.swift +++ b/Classes/HexColors.swift @@ -21,9 +21,9 @@ #endif public extension HexColor { - typealias HexString = String + typealias Hex = String - convenience init?(hex string: HexString, alpha: CGFloat? = nil) { + convenience init?(hex string: Hex, alpha: CGFloat? = nil) { guard let hexType = Type(from: string), @@ -38,14 +38,27 @@ public extension HexColor { #endif } + var hex: Hex? { + var r: CGFloat = 0, g: CGFloat = 0, b: CGFloat = 0, a: CGFloat = 0, rgb: Int + getRed(&r, green: &g, blue: &b, alpha: &a) + + if a == 1 { // no alpha value set, we are returning the short version + rgb = (Int)(r*255)<<16 | (Int)(g*255)<<8 | (Int)(r*255)<<0 + } else { + rgb = (Int)(r*255)<<24 | (Int)(g*255)<<16 | (Int)(r*255)<<8 | (Int)(a*255)<<0 + } + + return String(format: "#%06x", rgb) + } + fileprivate enum `Type` { - case RGBshort(rgb: HexString) - case RGBshortAlpha(rgba: HexString) - case RGB(rgb: HexString) - case RGBA(rgba: HexString) + case RGBshort(rgb: Hex) + case RGBshortAlpha(rgba: Hex) + case RGB(rgb: Hex) + case RGBA(rgba: Hex) - init?(from hex: HexString) { + init?(from hex: Hex) { var hexString = hex hexString.removeHashIfNecessary() @@ -57,7 +70,7 @@ public extension HexColor { self = t } - static func transform(hex string: HexString) -> Type? { + static func transform(hex string: Hex) -> Type? { switch string.characters.count { case 3: return .RGBshort(rgb: string) @@ -72,7 +85,7 @@ public extension HexColor { } } - var value: HexString { + var value: Hex { switch self { case .RGBshort(let rgb): return rgb From 99e05cf23cf707e366bdfa727744afb60cf5820a Mon Sep 17 00:00:00 2001 From: Marius Landwehr Date: Wed, 28 Dec 2016 14:42:46 +0100 Subject: [PATCH 05/31] Added Travis Support for Unit Tests --- .travis.yml | 8 +-- ....xcscheme => HexColors-iOS-Tests.xcscheme} | 17 ++---- ...Colors.xcscheme => HexColors-iOS.xcscheme} | 41 +++++-------- ...sOSX.xcscheme => HexColors-macOS.xcscheme} | 57 ++++++++----------- 4 files changed, 44 insertions(+), 79 deletions(-) rename HexColors.xcodeproj/xcshareddata/xcschemes/{HexColorsTests.xcscheme => HexColors-iOS-Tests.xcscheme} (75%) rename HexColors.xcodeproj/xcshareddata/xcschemes/{HexColors.xcscheme => HexColors-iOS.xcscheme} (70%) rename HexColors.xcodeproj/xcshareddata/xcschemes/{HexColorsOSX.xcscheme => HexColors-macOS.xcscheme} (63%) diff --git a/.travis.yml b/.travis.yml index 61fea0c..cf07a4a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,5 @@ -language: objective-c -osx_image: xcode7.2 +language: swift +osx_image: xcode8.2 xcode_project: HexColors.xcodeproj -xcode_scheme: HexColors -xcode_sdk: iphonesimulator9.2 +xcode_scheme: HexColors-iOS-Tests +xcode_sdk: iphonesimulator10.2 diff --git a/HexColors.xcodeproj/xcshareddata/xcschemes/HexColorsTests.xcscheme b/HexColors.xcodeproj/xcshareddata/xcschemes/HexColors-iOS-Tests.xcscheme similarity index 75% rename from HexColors.xcodeproj/xcshareddata/xcschemes/HexColorsTests.xcscheme rename to HexColors.xcodeproj/xcshareddata/xcschemes/HexColors-iOS-Tests.xcscheme index 905ce00..1d43989 100644 --- a/HexColors.xcodeproj/xcshareddata/xcschemes/HexColorsTests.xcscheme +++ b/HexColors.xcodeproj/xcshareddata/xcschemes/HexColors-iOS-Tests.xcscheme @@ -1,6 +1,6 @@ - - - - diff --git a/HexColors.xcodeproj/xcshareddata/xcschemes/HexColors.xcscheme b/HexColors.xcodeproj/xcshareddata/xcschemes/HexColors-iOS.xcscheme similarity index 70% rename from HexColors.xcodeproj/xcshareddata/xcschemes/HexColors.xcscheme rename to HexColors.xcodeproj/xcshareddata/xcschemes/HexColors-iOS.xcscheme index 292fc86..37a0324 100644 --- a/HexColors.xcodeproj/xcshareddata/xcschemes/HexColors.xcscheme +++ b/HexColors.xcodeproj/xcshareddata/xcschemes/HexColors-iOS.xcscheme @@ -1,6 +1,6 @@ - - - - @@ -40,16 +26,15 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" - shouldUseLaunchSchemeArgsEnv = "YES" - codeCoverageEnabled = "YES"> + shouldUseLaunchSchemeArgsEnv = "YES"> @@ -57,9 +42,9 @@ @@ -79,9 +64,9 @@ @@ -97,9 +82,9 @@ diff --git a/HexColors.xcodeproj/xcshareddata/xcschemes/HexColorsOSX.xcscheme b/HexColors.xcodeproj/xcshareddata/xcschemes/HexColors-macOS.xcscheme similarity index 63% rename from HexColors.xcodeproj/xcshareddata/xcschemes/HexColorsOSX.xcscheme rename to HexColors.xcodeproj/xcshareddata/xcschemes/HexColors-macOS.xcscheme index 7adbcd5..045d1d8 100644 --- a/HexColors.xcodeproj/xcshareddata/xcschemes/HexColorsOSX.xcscheme +++ b/HexColors.xcodeproj/xcshareddata/xcschemes/HexColors-macOS.xcscheme @@ -1,6 +1,6 @@ - - - - + shouldUseLaunchSchemeArgsEnv = "YES"> @@ -56,28 +42,31 @@ + + @@ -85,17 +74,17 @@ From 16fc4d07fad927986d575b6ab17c52d4eeb3dbd3 Mon Sep 17 00:00:00 2001 From: Marius Landwehr Date: Wed, 28 Dec 2016 14:43:52 +0100 Subject: [PATCH 06/31] Tests are now working properly --- HexColors-iOSTests/HexColors_iOSTests.swift | 2 +- HexColors-macOSTests/HexColors_macOSTests.swift | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/HexColors-iOSTests/HexColors_iOSTests.swift b/HexColors-iOSTests/HexColors_iOSTests.swift index 8e3db28..15c95c8 100644 --- a/HexColors-iOSTests/HexColors_iOSTests.swift +++ b/HexColors-iOSTests/HexColors_iOSTests.swift @@ -7,7 +7,7 @@ // import XCTest -@testable import HexColors_iOS +@testable import HexColors class HexColors_iOSTests: XCTestCase { diff --git a/HexColors-macOSTests/HexColors_macOSTests.swift b/HexColors-macOSTests/HexColors_macOSTests.swift index 2641138..eb7acdd 100644 --- a/HexColors-macOSTests/HexColors_macOSTests.swift +++ b/HexColors-macOSTests/HexColors_macOSTests.swift @@ -7,7 +7,7 @@ // import XCTest -@testable import HexColors_macOS +@testable import HexColors class HexColors_macOSTests: XCTestCase { From cc91b6b23c1721d378fa20aea62a8627fa0aea5a Mon Sep 17 00:00:00 2001 From: Marius Landwehr Date: Wed, 28 Dec 2016 15:16:13 +0100 Subject: [PATCH 07/31] Added Tests for iOS --- HexColors-iOSTests/HexColors_iOSTests.swift | 135 ++++++++++++++++-- .../xcschemes/HexColors-iOS-Tests.xcscheme | 3 +- 2 files changed, 123 insertions(+), 15 deletions(-) diff --git a/HexColors-iOSTests/HexColors_iOSTests.swift b/HexColors-iOSTests/HexColors_iOSTests.swift index 15c95c8..987d597 100644 --- a/HexColors-iOSTests/HexColors_iOSTests.swift +++ b/HexColors-iOSTests/HexColors_iOSTests.swift @@ -11,26 +11,133 @@ import XCTest class HexColors_iOSTests: XCTestCase { - override func setUp() { - super.setUp() - // Put setup code here. This method is called before the invocation of each test method in the class. + func testCantCreateColorFromEmptyString() { + + XCTAssertNil(UIColor(hex: "")) } - override func tearDown() { - // Put teardown code here. This method is called after the invocation of each test method in the class. - super.tearDown() + func testCantCreateColorFromEmptyStringWithAlpha() { + + XCTAssertNil(UIColor(hex: "", alpha: 0.2)) } - func testExample() { - // This is an example of a functional test case. - // Use XCTAssert and related functions to verify your tests produce the correct results. + func testCantCreateColorFromStringThatsNotHexConform() { + + XCTAssertNil(UIColor(hex: "Wow what a nice view!")) } - func testPerformanceExample() { - // This is an example of a performance test case. - self.measure { - // Put the code you want to measure the time of here. - } + func testCantCreateColorFromStringThatsNotHexConformWithAlpha() { + + XCTAssertNil(UIColor(hex: "Wow what a nice view!", alpha: 0.2)) } + func testCantCreateColorFromStringWith3CharactersThatAreNotInHexRange() { + XCTAssertNil(UIColor(hex: "ZXY")) + } + + func testCantCreateColorFromStringWith3CharactersThatAreNotInHexRangeWithAlpha() { + XCTAssertNil(UIColor(hex: "ZXY", alpha: 0.2)) + } + + func testCantCreateColorFromStringWith4CharactersThatAreNotInHexRange() { + XCTAssertNil(UIColor(hex: "ZXYL")) + } + + func testCantCreateColorFromStringWith4CharactersThatAreNotInHexRangeWithAlpha() { + XCTAssertNil(UIColor(hex: "ZXYL", alpha: 0.2)) + } + + func testCantCreateColorFromStringWith6CharactersThatAreNotInHexRange() { + XCTAssertNil(UIColor(hex: "ZXYLPK")) + } + + func testCantCreateColorFromStringWith6CharactersThatAreNotInHexRangeWithAlpha() { + XCTAssertNil(UIColor(hex: "ZXYLPK", alpha: 0.2)) + } + + func testCantCreateColorFromStringWith8CharactersThatAreNotInHexRange() { + XCTAssertNil(UIColor(hex: "ZXYLPKXX")) + } + + func testCantCreateColorFromStringWith8CharactersThatAreNotInHexRangeWithAlpha() { + XCTAssertNil(UIColor(hex: "ZXYLPKXX", alpha: 0.2)) + } + + func testCanCreateColorFromValidHexStringWith3Characters() { + XCTAssertEqual(UIColor(hex: "FFF"), UIColor(red: 1, green: 1, blue: 1, alpha: 1)) + } + + func testCanCreateColorFromValidHexStringWith3CharactersAndHashPrefix() { + XCTAssertEqual(UIColor(hex: "#FFF"), UIColor(red: 1, green: 1, blue: 1, alpha: 1)) + } + + func testCanCreateColorFromValidHexStringWith3CharactersAndAlpha() { + XCTAssertEqual(UIColor(hex: "FFF", alpha: 0.2), UIColor(red: 1, green: 1, blue: 1, alpha: 0.2)) + } + + func testCanCreateColorFromValidHexStringWith3CharactersAndAlphaAndHashPrefix() { + XCTAssertEqual(UIColor(hex: "#FFF", alpha: 0.2), UIColor(red: 1, green: 1, blue: 1, alpha: 0.2)) + } + + func testCanCreateColorFromValidHexStringWith4Characters() { + XCTAssertEqual(UIColor(hex: "FFF0"), UIColor(red: 1, green: 1, blue: 1, alpha: 0)) + } + + func testCanCreateColorFromValidHexStringWith4CharactersAndHashPrefix() { + XCTAssertEqual(UIColor(hex: "#FFF0"), UIColor(red: 1, green: 1, blue: 1, alpha: 0)) + } + + func testCanCreateColorFromValidHexStringWith4CharactersAndAlpha() { + XCTAssertEqual(UIColor(hex: "FFFF", alpha: 0.2), UIColor(red: 1, green: 1, blue: 1, alpha: 0.2)) + } + + func testCanCreateColorFromValidHexStringWith4CharactersAndAlphaAndHashPrefix() { + XCTAssertEqual(UIColor(hex: "#FFFF", alpha: 0.2), UIColor(red: 1, green: 1, blue: 1, alpha: 0.2)) + } + + func testCanCreateColorFromValidHexStringWith6Characters() { + XCTAssertEqual(UIColor(hex: "FF00FF"), UIColor(red: 1, green: 0, blue: 1, alpha: 1)) + } + + func testCanCreateColorFromValidHexStringWith6CharactersAndHashPrefix() { + XCTAssertEqual(UIColor(hex: "#FF00FF"), UIColor(red: 1, green: 0, blue: 1, alpha: 1)) + } + + func testCanCreateColorFromValidHexStringWith6CharactersAndAlpha() { + XCTAssertEqual(UIColor(hex: "FF00FF", alpha: 0.2), UIColor(red: 1, green: 0, blue: 1, alpha: 0.2)) + } + + func testCanCreateColorFromValidHexStringWith6CharactersAndAlphaAndHashPrefix() { + XCTAssertEqual(UIColor(hex: "#FF00FF", alpha: 0.2), UIColor(red: 1, green: 0, blue: 1, alpha: 0.2)) + } + + func testCanCreateColorFromValidHexStringWith8Characters() { + XCTAssertEqual(UIColor(hex: "FF00FF00"), UIColor(red: 1, green: 0, blue: 1, alpha: 0)) + } + + func testCanCreateColorFromValidHexStringWith8CharactersAndHashPrefix() { + XCTAssertEqual(UIColor(hex: "#FF00FF00"), UIColor(red: 1, green: 0, blue: 1, alpha: 0)) + } + + func testCanCreateColorFromValidHexStringWith8CharactersAndAlpha() { + XCTAssertEqual(UIColor(hex: "FF00FFFF", alpha: 0.2), UIColor(red: 1, green: 0, blue: 1, alpha: 0.2)) + } + + func testCanCreateColorFromValidHexStringWith8CharactersAndAlphaAndHashPrefix() { + XCTAssertEqual(UIColor(hex: "#FF00FFFF", alpha: 0.2), UIColor(red: 1, green: 0, blue: 1, alpha: 0.2)) + } + + func testCanTransformToColorAndBackToHexString() { + let hexString = "#ff00ff" + let color = UIColor(hex: hexString) + + XCTAssertEqual(hexString, color?.hex) + } + + func testCanTransformToColorWithAlphaAndBackToHexString() { + let hexString = "#ff00ff00" + let color = UIColor(hex: hexString) + + XCTAssertEqual(hexString, color?.hex) + } } diff --git a/HexColors.xcodeproj/xcshareddata/xcschemes/HexColors-iOS-Tests.xcscheme b/HexColors.xcodeproj/xcshareddata/xcschemes/HexColors-iOS-Tests.xcscheme index 1d43989..1a2531a 100644 --- a/HexColors.xcodeproj/xcshareddata/xcschemes/HexColors-iOS-Tests.xcscheme +++ b/HexColors.xcodeproj/xcshareddata/xcschemes/HexColors-iOS-Tests.xcscheme @@ -10,7 +10,8 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" - shouldUseLaunchSchemeArgsEnv = "YES"> + shouldUseLaunchSchemeArgsEnv = "YES" + codeCoverageEnabled = "YES"> From d584d9f792e352175be560b2565d8e1a499df0f4 Mon Sep 17 00:00:00 2001 From: Marius Landwehr Date: Wed, 28 Dec 2016 15:37:38 +0100 Subject: [PATCH 08/31] Next try for travis --- .travis.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index cf07a4a..dd435d2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,8 @@ -language: swift +language: objective-c osx_image: xcode8.2 xcode_project: HexColors.xcodeproj xcode_scheme: HexColors-iOS-Tests xcode_sdk: iphonesimulator10.2 + +script: + - xcodebuild test -scheme HexColors-iOS-Tests \ No newline at end of file From 3577c1d4d12e40fdfe079f1bce0f2cc7a74e527a Mon Sep 17 00:00:00 2001 From: Marius Landwehr Date: Wed, 28 Dec 2016 15:41:23 +0100 Subject: [PATCH 09/31] Added the script on my own --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index dd435d2..4eef81a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,4 +5,4 @@ xcode_scheme: HexColors-iOS-Tests xcode_sdk: iphonesimulator10.2 script: - - xcodebuild test -scheme HexColors-iOS-Tests \ No newline at end of file + - xcodebuild -project HexColors.xcodeproj -scheme "HexColors-iOS-Tests" -destination "platform=iOS Simulator,name=iPhone\ 6" -sdk iphonesimulator build test \ No newline at end of file From fa6832103519d5c871b617959f419391b13b1bd9 Mon Sep 17 00:00:00 2001 From: Marius Landwehr Date: Wed, 28 Dec 2016 15:45:56 +0100 Subject: [PATCH 10/31] Added Version for the SIm --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 4eef81a..0ad12a1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,4 +5,4 @@ xcode_scheme: HexColors-iOS-Tests xcode_sdk: iphonesimulator10.2 script: - - xcodebuild -project HexColors.xcodeproj -scheme "HexColors-iOS-Tests" -destination "platform=iOS Simulator,name=iPhone\ 6" -sdk iphonesimulator build test \ No newline at end of file + - xcodebuild -project HexColors.xcodeproj -scheme "HexColors-iOS-Tests" -destination "platform=iOS Simulator,name=iPhone\ 6,os=10.2" -sdk iphonesimulator build test \ No newline at end of file From 9cb56b38ded40539d9a6980a64f219c2bcb1044e Mon Sep 17 00:00:00 2001 From: Marius Landwehr Date: Wed, 28 Dec 2016 15:52:13 +0100 Subject: [PATCH 11/31] removed name --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 0ad12a1..b7dc405 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,4 +5,4 @@ xcode_scheme: HexColors-iOS-Tests xcode_sdk: iphonesimulator10.2 script: - - xcodebuild -project HexColors.xcodeproj -scheme "HexColors-iOS-Tests" -destination "platform=iOS Simulator,name=iPhone\ 6,os=10.2" -sdk iphonesimulator build test \ No newline at end of file + - xcodebuild -project HexColors.xcodeproj -scheme "HexColors-iOS-Tests" -destination "platform=iOS Simulator,name=iPhone 6" -sdk iphonesimulator build test \ No newline at end of file From 96e59f901213aafd712f977b7ca64ad42d296321 Mon Sep 17 00:00:00 2001 From: Marius Landwehr Date: Wed, 28 Dec 2016 15:56:52 +0100 Subject: [PATCH 12/31] added latest os to travisfile --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index b7dc405..126e528 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,4 +5,4 @@ xcode_scheme: HexColors-iOS-Tests xcode_sdk: iphonesimulator10.2 script: - - xcodebuild -project HexColors.xcodeproj -scheme "HexColors-iOS-Tests" -destination "platform=iOS Simulator,name=iPhone 6" -sdk iphonesimulator build test \ No newline at end of file + - xcodebuild -project HexColors.xcodeproj -scheme "HexColors-iOS-Tests" -destination "platform=iOS Simulator,OS=latest,name=iPhone 6" -sdk iphonesimulator build test \ No newline at end of file From ba8e7731a050b1d44535587f272603d635b8a417 Mon Sep 17 00:00:00 2001 From: Marius Landwehr Date: Wed, 28 Dec 2016 15:59:47 +0100 Subject: [PATCH 13/31] re added version to travisfile --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 126e528..aade8df 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,4 +5,4 @@ xcode_scheme: HexColors-iOS-Tests xcode_sdk: iphonesimulator10.2 script: - - xcodebuild -project HexColors.xcodeproj -scheme "HexColors-iOS-Tests" -destination "platform=iOS Simulator,OS=latest,name=iPhone 6" -sdk iphonesimulator build test \ No newline at end of file + - xcodebuild -project HexColors.xcodeproj -scheme "HexColors-iOS-Tests" -destination "platform=iOS Simulator,OS=10.2,name=iPhone 6" -sdk iphonesimulator build test \ No newline at end of file From f80ccdaead4f38d1affc6e7eafd4100641b6d86f Mon Sep 17 00:00:00 2001 From: Marius Landwehr Date: Wed, 28 Dec 2016 21:45:39 +0100 Subject: [PATCH 14/31] Removed old objective-c files and setup travis correctly --- .travis.yml | 5 +- .../project.pbxproj | 311 -------- .../contents.xcworkspacedata | 7 - .../xcshareddata/HexColor Examples.xccheckout | 41 - Example/HexColor Examples/AppDelegate.h | 15 - Example/HexColor Examples/AppDelegate.m | 53 -- .../HexColor Examples-Info.plist | 49 -- .../HexColor Examples-Prefix.pch | 14 - .../HexColorExampleViewController.h | 22 - .../HexColorExampleViewController.m | 74 -- .../HexColorExampleViewController.xib | 738 ------------------ .../AppIcon.appiconset/Contents.json | 88 --- .../LaunchImage.launchimage/Contents.json | 94 --- .../Default-568h@2x.png | Bin 18594 -> 0 bytes .../LaunchImage.launchimage/Default.png | Bin 6540 -> 0 bytes .../LaunchImage.launchimage/Default@2x.png | Bin 16107 -> 0 bytes .../en.lproj/InfoPlist.strings | 2 - Example/HexColor Examples/main.m | 18 - .../xcschemes/HexColors-macOS-Tests.xcscheme | 56 ++ HexColors/Info.plist | 26 - HexColorsOSX/Info.plist | 28 - HexColorsTests/HexColorsTests.m | 120 --- HexColorsTests/Info.plist | 24 - 23 files changed, 57 insertions(+), 1728 deletions(-) delete mode 100644 Example/HexColor Examples.xcodeproj/project.pbxproj delete mode 100644 Example/HexColor Examples.xcodeproj/project.xcworkspace/contents.xcworkspacedata delete mode 100644 Example/HexColor Examples.xcodeproj/project.xcworkspace/xcshareddata/HexColor Examples.xccheckout delete mode 100644 Example/HexColor Examples/AppDelegate.h delete mode 100644 Example/HexColor Examples/AppDelegate.m delete mode 100644 Example/HexColor Examples/HexColor Examples-Info.plist delete mode 100644 Example/HexColor Examples/HexColor Examples-Prefix.pch delete mode 100644 Example/HexColor Examples/HexColorExampleViewController.h delete mode 100644 Example/HexColor Examples/HexColorExampleViewController.m delete mode 100644 Example/HexColor Examples/HexColorExampleViewController.xib delete mode 100644 Example/HexColor Examples/Images.xcassets/AppIcon.appiconset/Contents.json delete mode 100644 Example/HexColor Examples/Images.xcassets/LaunchImage.launchimage/Contents.json delete mode 100644 Example/HexColor Examples/Images.xcassets/LaunchImage.launchimage/Default-568h@2x.png delete mode 100644 Example/HexColor Examples/Images.xcassets/LaunchImage.launchimage/Default.png delete mode 100644 Example/HexColor Examples/Images.xcassets/LaunchImage.launchimage/Default@2x.png delete mode 100644 Example/HexColor Examples/en.lproj/InfoPlist.strings delete mode 100644 Example/HexColor Examples/main.m create mode 100644 HexColors.xcodeproj/xcshareddata/xcschemes/HexColors-macOS-Tests.xcscheme delete mode 100644 HexColors/Info.plist delete mode 100644 HexColorsOSX/Info.plist delete mode 100644 HexColorsTests/HexColorsTests.m delete mode 100644 HexColorsTests/Info.plist diff --git a/.travis.yml b/.travis.yml index aade8df..cc7d2be 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,8 +1,5 @@ language: objective-c osx_image: xcode8.2 -xcode_project: HexColors.xcodeproj -xcode_scheme: HexColors-iOS-Tests -xcode_sdk: iphonesimulator10.2 script: - - xcodebuild -project HexColors.xcodeproj -scheme "HexColors-iOS-Tests" -destination "platform=iOS Simulator,OS=10.2,name=iPhone 6" -sdk iphonesimulator build test \ No newline at end of file + - xcodebuild test -scheme HexColors-iOS-Tests -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 5s,OS=10.2' \ No newline at end of file diff --git a/Example/HexColor Examples.xcodeproj/project.pbxproj b/Example/HexColor Examples.xcodeproj/project.pbxproj deleted file mode 100644 index b44f20c..0000000 --- a/Example/HexColor Examples.xcodeproj/project.pbxproj +++ /dev/null @@ -1,311 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 2DACEC9E1A794CA900FEC3CE /* HexColors.m in Sources */ = {isa = PBXBuildFile; fileRef = 2DACEC9D1A794CA900FEC3CE /* HexColors.m */; }; - 6DD2094317FEBB86000B398E /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 6DD2094217FEBB86000B398E /* Images.xcassets */; }; - 8E2D283B174BEDA500B30576 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8E2D283A174BEDA500B30576 /* UIKit.framework */; }; - 8E2D283D174BEDA500B30576 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8E2D283C174BEDA500B30576 /* Foundation.framework */; }; - 8E2D283F174BEDA500B30576 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8E2D283E174BEDA500B30576 /* CoreGraphics.framework */; }; - 8E2D2845174BEDA500B30576 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 8E2D2843174BEDA500B30576 /* InfoPlist.strings */; }; - 8E2D2847174BEDA500B30576 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 8E2D2846174BEDA500B30576 /* main.m */; }; - 8E2D284B174BEDA500B30576 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 8E2D284A174BEDA500B30576 /* AppDelegate.m */; }; - 8E2D285E174BEE1900B30576 /* HexColorExampleViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8E2D285C174BEE1900B30576 /* HexColorExampleViewController.m */; }; - 8E2D285F174BEE1900B30576 /* HexColorExampleViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 8E2D285D174BEE1900B30576 /* HexColorExampleViewController.xib */; }; -/* End PBXBuildFile section */ - -/* Begin PBXFileReference section */ - 2DACEC9C1A794CA900FEC3CE /* HexColors.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HexColors.h; sourceTree = ""; }; - 2DACEC9D1A794CA900FEC3CE /* HexColors.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HexColors.m; sourceTree = ""; }; - 6DD2094217FEBB86000B398E /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; - 8E2D2837174BEDA500B30576 /* HexColor Examples.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "HexColor Examples.app"; sourceTree = BUILT_PRODUCTS_DIR; }; - 8E2D283A174BEDA500B30576 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; - 8E2D283C174BEDA500B30576 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; - 8E2D283E174BEDA500B30576 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; - 8E2D2842174BEDA500B30576 /* HexColor Examples-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "HexColor Examples-Info.plist"; sourceTree = ""; }; - 8E2D2844174BEDA500B30576 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; - 8E2D2846174BEDA500B30576 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; - 8E2D2848174BEDA500B30576 /* HexColor Examples-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "HexColor Examples-Prefix.pch"; sourceTree = ""; }; - 8E2D2849174BEDA500B30576 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; - 8E2D284A174BEDA500B30576 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; - 8E2D285B174BEE1900B30576 /* HexColorExampleViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HexColorExampleViewController.h; sourceTree = ""; }; - 8E2D285C174BEE1900B30576 /* HexColorExampleViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HexColorExampleViewController.m; sourceTree = ""; }; - 8E2D285D174BEE1900B30576 /* HexColorExampleViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = HexColorExampleViewController.xib; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 8E2D2834174BEDA500B30576 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 8E2D283B174BEDA500B30576 /* UIKit.framework in Frameworks */, - 8E2D283D174BEDA500B30576 /* Foundation.framework in Frameworks */, - 8E2D283F174BEDA500B30576 /* CoreGraphics.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 2DACEC9B1A794CA900FEC3CE /* Classes */ = { - isa = PBXGroup; - children = ( - 2DACEC9C1A794CA900FEC3CE /* HexColors.h */, - 2DACEC9D1A794CA900FEC3CE /* HexColors.m */, - ); - name = Classes; - path = ../Classes; - sourceTree = ""; - }; - 8E2D282E174BEDA500B30576 = { - isa = PBXGroup; - children = ( - 2DACEC9B1A794CA900FEC3CE /* Classes */, - 8E2D2840174BEDA500B30576 /* HexColor Examples */, - 8E2D2839174BEDA500B30576 /* Frameworks */, - 8E2D2838174BEDA500B30576 /* Products */, - ); - sourceTree = ""; - }; - 8E2D2838174BEDA500B30576 /* Products */ = { - isa = PBXGroup; - children = ( - 8E2D2837174BEDA500B30576 /* HexColor Examples.app */, - ); - name = Products; - sourceTree = ""; - }; - 8E2D2839174BEDA500B30576 /* Frameworks */ = { - isa = PBXGroup; - children = ( - 8E2D283A174BEDA500B30576 /* UIKit.framework */, - 8E2D283C174BEDA500B30576 /* Foundation.framework */, - 8E2D283E174BEDA500B30576 /* CoreGraphics.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; - 8E2D2840174BEDA500B30576 /* HexColor Examples */ = { - isa = PBXGroup; - children = ( - 8E2D2849174BEDA500B30576 /* AppDelegate.h */, - 8E2D284A174BEDA500B30576 /* AppDelegate.m */, - 8E2D2841174BEDA500B30576 /* Supporting Files */, - 8E2D285B174BEE1900B30576 /* HexColorExampleViewController.h */, - 8E2D285C174BEE1900B30576 /* HexColorExampleViewController.m */, - 8E2D285D174BEE1900B30576 /* HexColorExampleViewController.xib */, - 6DD2094217FEBB86000B398E /* Images.xcassets */, - ); - path = "HexColor Examples"; - sourceTree = ""; - }; - 8E2D2841174BEDA500B30576 /* Supporting Files */ = { - isa = PBXGroup; - children = ( - 8E2D2842174BEDA500B30576 /* HexColor Examples-Info.plist */, - 8E2D2843174BEDA500B30576 /* InfoPlist.strings */, - 8E2D2846174BEDA500B30576 /* main.m */, - 8E2D2848174BEDA500B30576 /* HexColor Examples-Prefix.pch */, - ); - name = "Supporting Files"; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 8E2D2836174BEDA500B30576 /* HexColor Examples */ = { - isa = PBXNativeTarget; - buildConfigurationList = 8E2D2854174BEDA500B30576 /* Build configuration list for PBXNativeTarget "HexColor Examples" */; - buildPhases = ( - 8E2D2833174BEDA500B30576 /* Sources */, - 8E2D2834174BEDA500B30576 /* Frameworks */, - 8E2D2835174BEDA500B30576 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = "HexColor Examples"; - productName = "HexColor Examples"; - productReference = 8E2D2837174BEDA500B30576 /* HexColor Examples.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 8E2D282F174BEDA500B30576 /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 0460; - ORGANIZATIONNAME = "Marius Landwehr"; - }; - buildConfigurationList = 8E2D2832174BEDA500B30576 /* Build configuration list for PBXProject "HexColor Examples" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 0; - knownRegions = ( - en, - ); - mainGroup = 8E2D282E174BEDA500B30576; - productRefGroup = 8E2D2838174BEDA500B30576 /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 8E2D2836174BEDA500B30576 /* HexColor Examples */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 8E2D2835174BEDA500B30576 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 8E2D2845174BEDA500B30576 /* InfoPlist.strings in Resources */, - 6DD2094317FEBB86000B398E /* Images.xcassets in Resources */, - 8E2D285F174BEE1900B30576 /* HexColorExampleViewController.xib in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 8E2D2833174BEDA500B30576 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 8E2D2847174BEDA500B30576 /* main.m in Sources */, - 2DACEC9E1A794CA900FEC3CE /* HexColors.m in Sources */, - 8E2D284B174BEDA500B30576 /* AppDelegate.m in Sources */, - 8E2D285E174BEE1900B30576 /* HexColorExampleViewController.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXVariantGroup section */ - 8E2D2843174BEDA500B30576 /* InfoPlist.strings */ = { - isa = PBXVariantGroup; - children = ( - 8E2D2844174BEDA500B30576 /* en */, - ); - name = InfoPlist.strings; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - 8E2D2852174BEDA500B30576 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 6.1; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - 8E2D2853174BEDA500B30576 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 6.1; - OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - 8E2D2855174BEDA500B30576 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "HexColor Examples/HexColor Examples-Prefix.pch"; - INFOPLIST_FILE = "HexColor Examples/HexColor Examples-Info.plist"; - PRODUCT_NAME = "$(TARGET_NAME)"; - WRAPPER_EXTENSION = app; - }; - name = Debug; - }; - 8E2D2856174BEDA500B30576 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "HexColor Examples/HexColor Examples-Prefix.pch"; - INFOPLIST_FILE = "HexColor Examples/HexColor Examples-Info.plist"; - PRODUCT_NAME = "$(TARGET_NAME)"; - WRAPPER_EXTENSION = app; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 8E2D2832174BEDA500B30576 /* Build configuration list for PBXProject "HexColor Examples" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 8E2D2852174BEDA500B30576 /* Debug */, - 8E2D2853174BEDA500B30576 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 8E2D2854174BEDA500B30576 /* Build configuration list for PBXNativeTarget "HexColor Examples" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 8E2D2855174BEDA500B30576 /* Debug */, - 8E2D2856174BEDA500B30576 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 8E2D282F174BEDA500B30576 /* Project object */; -} diff --git a/Example/HexColor Examples.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Example/HexColor Examples.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 6ae2245..0000000 --- a/Example/HexColor Examples.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/Example/HexColor Examples.xcodeproj/project.xcworkspace/xcshareddata/HexColor Examples.xccheckout b/Example/HexColor Examples.xcodeproj/project.xcworkspace/xcshareddata/HexColor Examples.xccheckout deleted file mode 100644 index 73ec75b..0000000 --- a/Example/HexColor Examples.xcodeproj/project.xcworkspace/xcshareddata/HexColor Examples.xccheckout +++ /dev/null @@ -1,41 +0,0 @@ - - - - - IDESourceControlProjectFavoriteDictionaryKey - - IDESourceControlProjectIdentifier - 0F57C311-5867-47DE-A26F-FDF4124BEEE3 - IDESourceControlProjectName - HexColor Examples - IDESourceControlProjectOriginsDictionary - - A09197BDEFE5DB329169B5000201B999A865BEA1 - https://github.com/mRs-/HexColors - - IDESourceControlProjectPath - Example/HexColor Examples.xcodeproj - IDESourceControlProjectRelativeInstallPathDictionary - - A09197BDEFE5DB329169B5000201B999A865BEA1 - ../../.. - - IDESourceControlProjectURL - https://github.com/mRs-/HexColors - IDESourceControlProjectVersion - 111 - IDESourceControlProjectWCCIdentifier - A09197BDEFE5DB329169B5000201B999A865BEA1 - IDESourceControlProjectWCConfigurations - - - IDESourceControlRepositoryExtensionIdentifierKey - public.vcs.git - IDESourceControlWCCIdentifierKey - A09197BDEFE5DB329169B5000201B999A865BEA1 - IDESourceControlWCCName - HexColors - - - - diff --git a/Example/HexColor Examples/AppDelegate.h b/Example/HexColor Examples/AppDelegate.h deleted file mode 100644 index 41bf25b..0000000 --- a/Example/HexColor Examples/AppDelegate.h +++ /dev/null @@ -1,15 +0,0 @@ -// -// AppDelegate.h -// HexColor Examples -// -// Created by Marius Landwehr on 21.05.13. -// Copyright (c) 2013 Marius Landwehr. All rights reserved. -// - -#import - -@interface AppDelegate : UIResponder - -@property (strong, nonatomic) UIWindow *window; - -@end diff --git a/Example/HexColor Examples/AppDelegate.m b/Example/HexColor Examples/AppDelegate.m deleted file mode 100644 index 13d3a8f..0000000 --- a/Example/HexColor Examples/AppDelegate.m +++ /dev/null @@ -1,53 +0,0 @@ -// -// AppDelegate.m -// HexColor Examples -// -// Created by Marius Landwehr on 21.05.13. -// Copyright (c) 2013 Marius Landwehr. All rights reserved. -// - -#import "AppDelegate.h" -#import "HexColorExampleViewController.h" - -@implementation AppDelegate - -- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions -{ - self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; - - HexColorExampleViewController *exampleViewController = [[HexColorExampleViewController alloc] initWithNibName:nil bundle:nil]; - - self.window.rootViewController = exampleViewController; - - [self.window makeKeyAndVisible]; - return YES; -} - -- (void)applicationWillResignActive:(UIApplication *)application -{ - // 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. -} - -- (void)applicationDidEnterBackground:(UIApplication *)application -{ - // 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. -} - -- (void)applicationWillEnterForeground:(UIApplication *)application -{ - // 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. -} - -- (void)applicationDidBecomeActive:(UIApplication *)application -{ - // 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. -} - -- (void)applicationWillTerminate:(UIApplication *)application -{ - // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. -} - -@end diff --git a/Example/HexColor Examples/HexColor Examples-Info.plist b/Example/HexColor Examples/HexColor Examples-Info.plist deleted file mode 100644 index 50bd11e..0000000 --- a/Example/HexColor Examples/HexColor Examples-Info.plist +++ /dev/null @@ -1,49 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleDisplayName - ${PRODUCT_NAME} - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIcons - - CFBundleIcons~ipad - - CFBundleIdentifier - de.mariuslandwehr.${PRODUCT_NAME:rfc1034identifier} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - APPL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1.0 - LSRequiresIPhoneOS - - UIRequiredDeviceCapabilities - - armv7 - - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - - diff --git a/Example/HexColor Examples/HexColor Examples-Prefix.pch b/Example/HexColor Examples/HexColor Examples-Prefix.pch deleted file mode 100644 index ea981d5..0000000 --- a/Example/HexColor Examples/HexColor Examples-Prefix.pch +++ /dev/null @@ -1,14 +0,0 @@ -// -// Prefix header for all source files of the 'HexColor Examples' target in the 'HexColor Examples' project -// - -#import - -#ifndef __IPHONE_3_0 -#warning "This project uses features only available in iOS SDK 3.0 and later." -#endif - -#ifdef __OBJC__ - #import - #import -#endif diff --git a/Example/HexColor Examples/HexColorExampleViewController.h b/Example/HexColor Examples/HexColorExampleViewController.h deleted file mode 100644 index cb7284e..0000000 --- a/Example/HexColor Examples/HexColorExampleViewController.h +++ /dev/null @@ -1,22 +0,0 @@ -// -// HexColorExampleViewController.h -// HexColor Examples -// -// Created by Marius Landwehr on 21.05.13. -// Copyright (c) 2013 Marius Landwehr. All rights reserved. -// - -#import - -@interface HexColorExampleViewController : UIViewController - -@property (strong, nonatomic) IBOutlet UIView *backgroundView; - -- (IBAction)colorOne:(id)sender; -- (IBAction)colorTwo:(id)sender; -- (IBAction)colorThree:(id)sender; -- (IBAction)color333:(id)sender; -- (IBAction)color656:(id)sender; -- (IBAction)color295:(id)sender; - -@end diff --git a/Example/HexColor Examples/HexColorExampleViewController.m b/Example/HexColor Examples/HexColorExampleViewController.m deleted file mode 100644 index 3b963e3..0000000 --- a/Example/HexColor Examples/HexColorExampleViewController.m +++ /dev/null @@ -1,74 +0,0 @@ -// -// HexColorExampleViewController.m -// HexColor Examples -// -// Created by Marius Landwehr on 21.05.13. -// Copyright (c) 2013 Marius Landwehr. All rights reserved. -// - -#import "HexColorExampleViewController.h" -#import "HexColors.h" - -@interface HexColorExampleViewController () - -@end - -@implementation HexColorExampleViewController - -- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil -{ - self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; - if (self) { - // Custom initialization - } - return self; -} - -- (void)viewDidLoad -{ - [super viewDidLoad]; - // Do any additional setup after loading the view from its nib. -} - -- (void)didReceiveMemoryWarning -{ - [super didReceiveMemoryWarning]; - // Dispose of any resources that can be recreated. -} - -- (IBAction)colorOne:(id)sender { - [UIView animateWithDuration:0.3 animations:^{ - self.backgroundView.backgroundColor = [UIColor colorWithHexString:@"#999999"]; - }]; -} - -- (IBAction)colorTwo:(id)sender { - [UIView animateWithDuration:0.3 animations:^{ - self.backgroundView.backgroundColor = [UIColor colorWithHexString:@"#334455"]; - }]; -} - -- (IBAction)colorThree:(id)sender { - [UIView animateWithDuration:0.3 animations:^{ - self.backgroundView.backgroundColor = [UIColor colorWithHexString:@"#ff0099"]; - }]; -} - -- (IBAction)color333:(id)sender { - [UIView animateWithDuration:0.3 animations:^{ - self.backgroundView.backgroundColor = [UIColor colorWithHexString:@"333"]; - }]; -} - -- (IBAction)color656:(id)sender { - [UIView animateWithDuration:0.3 animations:^{ - self.backgroundView.backgroundColor = [UIColor colorWithHexString:@"656"]; - }]; -} - -- (IBAction)color295:(id)sender { - [UIView animateWithDuration:0.3 animations:^{ - self.backgroundView.backgroundColor = [UIColor colorWithHexString:@"295"]; - }]; -} -@end diff --git a/Example/HexColor Examples/HexColorExampleViewController.xib b/Example/HexColor Examples/HexColorExampleViewController.xib deleted file mode 100644 index 14aa815..0000000 --- a/Example/HexColor Examples/HexColorExampleViewController.xib +++ /dev/null @@ -1,738 +0,0 @@ - - - - 1552 - 12E55 - 3084 - 1187.39 - 626.00 - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - 2083 - - - IBNSLayoutConstraint - IBProxyObject - IBUIButton - IBUIView - - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - PluginDependencyRecalculationVersion - - - - - IBFilesOwner - IBCocoaTouchFramework - - - IBFirstResponder - IBCocoaTouchFramework - - - - 274 - - - - 292 - {{20, 485}, {83, 44}} - - - _NS:9 - NO - IBCocoaTouchFramework - 0 - 0 - 1 - #999999 - - 3 - MQA - - - 1 - MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA - - - 3 - MC41AA - - - 2 - 15 - - - Helvetica-Bold - 15 - 16 - - - - - 292 - {{119, 485}, {83, 44}} - - - _NS:9 - NO - IBCocoaTouchFramework - 0 - 0 - 1 - #334455 - - - 1 - MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA - - - - - - - - 292 - {{224, 485}, {76, 44}} - - - _NS:9 - NO - IBCocoaTouchFramework - 0 - 0 - 1 - #ff0099 - - - 1 - MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA - - - - - - - - 292 - {{20, 434}, {83, 44}} - - - _NS:9 - NO - IBCocoaTouchFramework - 0 - 0 - 1 - #333 - - - 1 - MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA - - - - - - - - 292 - {{119, 434}, {83, 44}} - - - _NS:9 - NO - IBCocoaTouchFramework - 0 - 0 - 1 - #656 - - - 1 - MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA - - - - - - - - 292 - {{221, 434}, {83, 44}} - - - _NS:9 - NO - IBCocoaTouchFramework - 0 - 0 - 1 - #295 - - - 1 - MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA - - - - - - - {{0, 20}, {320, 548}} - - - - 3 - MQA - - 2 - - - - - IBUIScreenMetrics - - YES - - - - - - {320, 568} - {568, 320} - - - IBCocoaTouchFramework - Retina 4 Full Screen - 2 - - IBCocoaTouchFramework - - - - - - - view - - - - 3 - - - - backgroundView - - - - 24 - - - - colorOne: - - - 7 - - 21 - - - - colorTwo: - - - 7 - - 22 - - - - colorThree: - - - 7 - - 23 - - - - color333: - - - 7 - - 63 - - - - color656: - - - 7 - - 64 - - - - color295: - - - 7 - - 65 - - - - - - 0 - - - - - - 1 - - - - - 6 - 0 - - 6 - 1 - - 20 - - 1000 - - 8 - 29 - 3 - - - - 4 - 0 - - 4 - 1 - - 20 - - 1000 - - 8 - 29 - 3 - - - - 4 - 0 - - 4 - 1 - - 20 - - 1000 - - 8 - 29 - 3 - - - - 9 - 0 - - 9 - 1 - - 0.0 - - 1000 - - 6 - 24 - 2 - - - - 11 - 0 - - 11 - 1 - - 0.0 - - 1000 - - 6 - 24 - 2 - - - - 6 - 0 - - 6 - 1 - - 0.0 - - 1000 - - 6 - 24 - 2 - - - - 3 - 0 - - 4 - 1 - - 8 - - 1000 - - 6 - 24 - 3 - - - - 4 - 0 - - 4 - 1 - - 20 - - 1000 - - 8 - 29 - 3 - - - - 5 - 0 - - 5 - 1 - - 20 - - 1000 - - 8 - 29 - 3 - - - - 11 - 0 - - 11 - 1 - - 0.0 - - 1000 - - 6 - 24 - 2 - - - - 5 - 0 - - 5 - 1 - - 0.0 - - 1000 - - 6 - 24 - 2 - - - - 9 - 0 - - 9 - 1 - - 0.0 - - 1000 - - 5 - 22 - 2 - - - - 6 - 0 - - 6 - 1 - - 0.0 - - 1000 - - 6 - 24 - 2 - - - - 5 - 0 - - 5 - 1 - - 20 - - 1000 - - 8 - 29 - 3 - - - - - - - - - - - - -1 - - - File's Owner - - - -2 - - - - - 4 - - - - - 5 - - - - - 7 - - - - - 8 - - - - - 12 - - - - - 14 - - - - - 18 - - - - - 20 - - - - - 25 - - - - - - 27 - - - - - 31 - - - - - 26 - - - - - 34 - - - - - 35 - - - - - 37 - - - - - 39 - - - - - 40 - - - - - 7 - 0 - - 0 - 1 - - 83 - - 1000 - - 3 - 9 - 1 - - - - - - 42 - - - - - 43 - - - - - 44 - - - - - 36 - - - - - - - HexColorExampleViewController - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - UIResponder - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - - - - - - - - - - - - - - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - - - - - 65 - - - 0 - IBCocoaTouchFramework - YES - 3 - YES - 2083 - - diff --git a/Example/HexColor Examples/Images.xcassets/AppIcon.appiconset/Contents.json b/Example/HexColor Examples/Images.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index da837d9..0000000 --- a/Example/HexColor Examples/Images.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "images" : [ - { - "idiom" : "iphone", - "scale" : "1x", - "size" : "57x57" - }, - { - "idiom" : "iphone", - "scale" : "2x", - "size" : "57x57" - }, - { - "idiom" : "iphone", - "scale" : "2x", - "size" : "60x60" - }, - { - "idiom" : "ipad", - "scale" : "1x", - "size" : "72x72" - }, - { - "idiom" : "ipad", - "scale" : "2x", - "size" : "72x72" - }, - { - "idiom" : "ipad", - "scale" : "1x", - "size" : "76x76" - }, - { - "idiom" : "ipad", - "scale" : "2x", - "size" : "76x76" - }, - { - "idiom" : "iphone", - "scale" : "1x", - "size" : "29x29" - }, - { - "idiom" : "iphone", - "scale" : "2x", - "size" : "29x29" - }, - { - "idiom" : "iphone", - "scale" : "2x", - "size" : "40x40" - }, - { - "idiom" : "ipad", - "scale" : "1x", - "size" : "50x50" - }, - { - "idiom" : "ipad", - "scale" : "2x", - "size" : "50x50" - }, - { - "idiom" : "ipad", - "scale" : "1x", - "size" : "40x40" - }, - { - "idiom" : "ipad", - "scale" : "2x", - "size" : "40x40" - }, - { - "idiom" : "ipad", - "scale" : "1x", - "size" : "29x29" - }, - { - "idiom" : "ipad", - "scale" : "2x", - "size" : "29x29" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/Example/HexColor Examples/Images.xcassets/LaunchImage.launchimage/Contents.json b/Example/HexColor Examples/Images.xcassets/LaunchImage.launchimage/Contents.json deleted file mode 100644 index a2a7d96..0000000 --- a/Example/HexColor Examples/Images.xcassets/LaunchImage.launchimage/Contents.json +++ /dev/null @@ -1,94 +0,0 @@ -{ - "images" : [ - { - "orientation" : "portrait", - "idiom" : "iphone", - "filename" : "Default.png", - "scale" : "1x" - }, - { - "orientation" : "portrait", - "idiom" : "iphone", - "filename" : "Default@2x.png", - "scale" : "2x" - }, - { - "orientation" : "portrait", - "idiom" : "iphone", - "filename" : "Default-568h@2x.png", - "subtype" : "retina4", - "scale" : "2x" - }, - { - "orientation" : "portrait", - "idiom" : "iphone", - "filename" : "Default@2x.png", - "minimum-system-version" : "7.0", - "scale" : "2x" - }, - { - "orientation" : "portrait", - "idiom" : "iphone", - "filename" : "Default-568h@2x.png", - "minimum-system-version" : "7.0", - "subtype" : "retina4", - "scale" : "2x" - }, - { - "orientation" : "portrait", - "idiom" : "ipad", - "extent" : "to-status-bar", - "scale" : "1x" - }, - { - "orientation" : "portrait", - "idiom" : "ipad", - "extent" : "to-status-bar", - "scale" : "2x" - }, - { - "orientation" : "landscape", - "idiom" : "ipad", - "extent" : "to-status-bar", - "scale" : "1x" - }, - { - "orientation" : "landscape", - "idiom" : "ipad", - "extent" : "to-status-bar", - "scale" : "2x" - }, - { - "orientation" : "portrait", - "idiom" : "ipad", - "minimum-system-version" : "7.0", - "extent" : "full-screen", - "scale" : "1x" - }, - { - "orientation" : "portrait", - "idiom" : "ipad", - "minimum-system-version" : "7.0", - "extent" : "full-screen", - "scale" : "2x" - }, - { - "orientation" : "landscape", - "idiom" : "ipad", - "minimum-system-version" : "7.0", - "extent" : "full-screen", - "scale" : "1x" - }, - { - "orientation" : "landscape", - "idiom" : "ipad", - "minimum-system-version" : "7.0", - "extent" : "full-screen", - "scale" : "2x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/Example/HexColor Examples/Images.xcassets/LaunchImage.launchimage/Default-568h@2x.png b/Example/HexColor Examples/Images.xcassets/LaunchImage.launchimage/Default-568h@2x.png deleted file mode 100644 index 0891b7aabfcf3422423b109c8beed2bab838c607..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 18594 zcmeI4X;f257Jx&9fS`ixvS;&$x8J@slQFSel)6zJN=?13FB7H(lQjRkSy8x_-S~tvu2gzn1oS+dLcF#eqtq$ z%tf9TTvX?`)R@}3uBI;jzS-=ZR-Td&MHaS&;!0?Ni*#$#`n*~CcQK)Q9vAQ~TUpnI!j)a2biYK^R)M~A5wUDZhx?ULMX z3x1P&qt=trOY6P2U67L=m=U?F|5#Uj(eCueNTZaHs_ceWiHeET+j+tp3Jt9g(ekqP z2WOvfR{qV+9r+o4J5?qK>7;;^+I7tGv-i)es$X_D=EoKF+S?zsyj^oRFElP}c}JT< zd8SUs-?O?}2YD#ngKbnHgzHBcboxK_2r9l(?eNCl-pEzkJm}fY?WC*jnS?VBE4EpY zO$fEejz6fU;W2Kl>JeQBZBl-%Irg`obSlg*@4QB;Dd1H7^Oi5wvt4d{RZ!8Og?^aE z)k0$1g+V3fd(gdQ3d&q2q-FL*uy#}|bc^=VhFsl0jBgUGJ+-s3U8MK9A!YJJMxpci z5hJ%|{DwV48fZn0{n5l$N_KcSb#NKE4plB`9I6Zt=Z!~-zw0{9tg$L&Ju1F0X)Cy8 zKF;(&lJ>x)Jw(=;p~sF(Sd9VWGwFE2rnyS9!f^DZ8+aCLq zQ};>lcJ1GDLqjm6Hd>|Eabno@P`~Bn(~6^aD_#yoEH(a?Nm1S<;S+hSxI5d16^<1lEM3NPFi zkqPrpL)+ zgnseFikg`gJVBha1&7C4;O6>h=dt~`ND+;Zd?W(4v2JIb7Pt>Td42%M-Ju-XAH#Pns762L}K3 zDhvsRqN0Ni(1UrishD2YvV?4*h2iFj$+&N||Fn$4n|^NSU+o?~jq`0jVQt8T9l{7b zXiwwODFh2V!Q6sqP9S>WH$oOf$N~=d0-bqTlD61!=`&0eAP-F>XN?*|gtOXX{ zQVTWyYo4ZK0GAw!GHf|pz9`D;-bbb*5LBX*{bnz|+)$@&P9|ORM2o?95{;ejvo&r- zq8cBhTN6nn)7~W>54U)%-F_-b?YKdfk5I8MHcuzBD5)!;yv#Z&R&^y=@=>VTIMy#r zX&U<=BsPkdqcMe<_}2+>H%XKyrr5ZR8_KVe>ZqYN z^=^~TFD};;rHJ$U;{~w^hYojl4hRI@SH$^K{YEo=sg)WY87r!*7blQK&qnpDo0`Vn zkl)9u9g=mCh&ZCJS(L4yN3k0kQ zuvg$h2KEEk51T+O0JQ+r0`R>g{jvqM0Mr6d3qUOZwE!?PI7HY@CE|dr sfw?Q;rAv?G4&^^8-z_>&sWXMxvD*gPOU4CBe-*@OtE+wfmVJNyHv)PfH~;_u diff --git a/Example/HexColor Examples/Images.xcassets/LaunchImage.launchimage/Default.png b/Example/HexColor Examples/Images.xcassets/LaunchImage.launchimage/Default.png deleted file mode 100644 index 4c8ca6f693f96d511e9113c0eb59eec552354e42..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6540 zcmeAS@N?(olHy`uVBq!ia0y~yU~~ZD2OMlbkt;o0To@QwR5G2N13aCb6#|O#(=u~X z85k@CTSM>X-wqM6>&y>YB4)1;;ojbLbbV-W^iFB1wa3^zCog^LCAReC4K0-?R_2{6 zrP*)4+_uWUy3w5N52M3PW_}MFMP9a~>YLvVZ1D_k*IMQ2QT^fwzoO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+^RTV>V9&YPAWMjd~%xpSg?ON?kK^X*Pb(o8jR zz;DmaOWMMr6=M~K?MFx4_xDkARTxLJ@W@ohAx z5RD0jGgk?QL@H`VubD2k4}?VtB8@g`%hHBA$2pJ(gK5g1HMNysXEF_BNu-p!&+Qa8_APgopHWnRgg=TZZF*sXWTMQPD z!Q(Au5|+F;7M~`tWbsU98~NA{h0Y7%GB|t&n}w9OOABU4^X*V5xuN;rY(M#ouuqm) zyt!e?28fY!FgP?8GvBsMl_aM^UUVKiGFsleFN?t^<46kO#pF-cX0;sIOb(aM z)^jQgX^Z6pKA9mC@N)_aiHj9HxD2|?A@Y9B_h}(*v3%ek8CXc1Qy^jFPF&zrMa1OZ zSVaF{&ZY|(|H0XE&X>-XQz1`=fF2n@VKC_|h3jlKVM&-jmyMavllcYr`6LVtfq2ou zd+8zkkCB+2)rxq0Lkq_&Ad@g(O8;pAm96>tu79?81T@Z<;gm^3ZtPG-SR94Mr<3tm z9NrR3u*4I5aMlo(09g@8m_;%Rf+XiSa_KZao9n}7N0JrsV#;5Ucr+F*TTzQ8{%f3O zeIUy?WDS|-$LvMc@Z7320)tr}bfIka5hx9H;8H|%our=C+Do0CSFRWue14o5#r8v2 zw=|&r4*eMX%lgCV(ka?*j%H^UuP4LmBC(ON`)&7>NF-|PDRU{-7o`CU0HNbd&c~))@yl9IKu_ zXA+A-!khpP_yx=f#qt2_0ptmgBf4gF!{Y)MW6R$cC1d7@$Yb?+_j zYwfE^5_e`vhT zX=u3r>4$fsxP&apbm@Rcbyuc2T=giqZiMo9@9=oua6#YH0hO-1ak9^rJTPMM qY4Yr5Cu^v99p{E9VdroUHKlRW;M8#BJ^AOQE?e9wSHJo8(7yq;BYKSh diff --git a/Example/HexColor Examples/en.lproj/InfoPlist.strings b/Example/HexColor Examples/en.lproj/InfoPlist.strings deleted file mode 100644 index 477b28f..0000000 --- a/Example/HexColor Examples/en.lproj/InfoPlist.strings +++ /dev/null @@ -1,2 +0,0 @@ -/* Localized versions of Info.plist keys */ - diff --git a/Example/HexColor Examples/main.m b/Example/HexColor Examples/main.m deleted file mode 100644 index 2fa1a81..0000000 --- a/Example/HexColor Examples/main.m +++ /dev/null @@ -1,18 +0,0 @@ -// -// main.m -// HexColor Examples -// -// Created by Marius Landwehr on 21.05.13. -// Copyright (c) 2013 Marius Landwehr. All rights reserved. -// - -#import - -#import "AppDelegate.h" - -int main(int argc, char *argv[]) -{ - @autoreleasepool { - return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); - } -} diff --git a/HexColors.xcodeproj/xcshareddata/xcschemes/HexColors-macOS-Tests.xcscheme b/HexColors.xcodeproj/xcshareddata/xcschemes/HexColors-macOS-Tests.xcscheme new file mode 100644 index 0000000..f1cc8bc --- /dev/null +++ b/HexColors.xcodeproj/xcshareddata/xcschemes/HexColors-macOS-Tests.xcscheme @@ -0,0 +1,56 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/HexColors/Info.plist b/HexColors/Info.plist deleted file mode 100644 index 32aaadf..0000000 --- a/HexColors/Info.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - reversebox.org.$(PRODUCT_NAME:rfc1034identifier) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - $(CURRENT_PROJECT_VERSION) - NSPrincipalClass - - - diff --git a/HexColorsOSX/Info.plist b/HexColorsOSX/Info.plist deleted file mode 100644 index a0c5627..0000000 --- a/HexColorsOSX/Info.plist +++ /dev/null @@ -1,28 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - reversebox.org.$(PRODUCT_NAME:rfc1034identifier) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - $(CURRENT_PROJECT_VERSION) - NSHumanReadableCopyright - Copyright © 2015 Reversebox. All rights reserved. - NSPrincipalClass - - - diff --git a/HexColorsTests/HexColorsTests.m b/HexColorsTests/HexColorsTests.m deleted file mode 100644 index d62d0ee..0000000 --- a/HexColorsTests/HexColorsTests.m +++ /dev/null @@ -1,120 +0,0 @@ -// -// HexColorsTests.m -// HexColorsTests -// -// Created by Marius Landwehr on 13.01.16. -// Copyright © 2016 Reversebox. All rights reserved. -// - -#import -#import "HexColors.h" - -@interface HexColorsTests : XCTestCase - -@end - -@implementation HexColorsTests - -- (void)setUp { - [super setUp]; - // Put setup code here. This method is called before the invocation of each test method in the class. -} - -- (void)tearDown { - // Put teardown code here. This method is called after the invocation of each test method in the class. - [super tearDown]; -} - -- (void)testEmptyHexString { - - UIColor *nilColor = [UIColor hx_colorWithHexString:@""]; - - NSAssert(nilColor == nil, @"nilColor is not nil"); -} - -- (void)testEmptyHexStringRGBA { - - UIColor *nilColor = [UIColor hx_colorWithHexRGBAString:@""]; - - NSAssert(nilColor == nil, @"nilColor is not nil"); -} - -- (void)testInvalidHexStringLength { - - UIColor *falseColor = [UIColor hx_colorWithHexString:@"12345"]; - - NSAssert(falseColor == nil, @"String should not create a valid color"); -} - -- (void)testInvalidHexStringRGBSLength { - - UIColor *falseColor = [UIColor hx_colorWithHexRGBAString:@"12345"]; - - NSAssert(falseColor == nil, @"String should not create a valid color"); -} - -- (void)testLongRGBASyntaxWithHash { - - UIColor *whiteColor = [UIColor whiteColor]; - UIColor *whiteHexColor = [UIColor hx_colorWithHexRGBAString:@"#ffffffff"]; - - NSAssert(whiteColor != whiteHexColor, @"hexColor is not equal to the white color"); -} - -- (void)testShortSyntaxWithHash { - - UIColor *whiteColor = [UIColor whiteColor]; - UIColor *whiteHexColor = [UIColor hx_colorWithHexString:@"#fff"]; - - NSAssert(whiteColor != whiteHexColor, @"hexColor is not equal to the white color"); -} - -- (void)testShortRGBASyntaxWithHash { - - UIColor *whiteColor = [UIColor whiteColor]; - UIColor *whiteHexColor = [UIColor hx_colorWithHexRGBAString:@"#fff"]; - - NSAssert(whiteColor != whiteHexColor, @"hexColor is not equal to the white color"); -} - -- (void)testShortSyntaxWithoutHash { - - UIColor *whiteColor = [UIColor whiteColor]; - UIColor *whiteHexColor = [UIColor hx_colorWithHexString:@"fff"]; - - NSAssert(whiteColor != whiteHexColor, @"hexColor is not equal to white color"); -} - -- (void)testShortRGBASyntaxWithoutHash { - - UIColor *whiteColor = [UIColor whiteColor]; - UIColor *whiteHexColor = [UIColor hx_colorWithHexRGBAString:@"fff"]; - - NSAssert(whiteColor != whiteHexColor, @"hexColor is not equal to white color"); -} - -- (void)testShortSyntaxWithHashAndAlpha { - - UIColor *whiteColorAlpha = [UIColor colorWithWhite:1 alpha:0.533333]; - UIColor *whiteHexColorAlpha = [UIColor hx_colorWithHexString:@"8fff"]; - - NSAssert(whiteColorAlpha != whiteHexColorAlpha, @"hexColor is not equal to white alpha hexColor"); -} - -- (void)testShortRGBASyntaxWithHashAndAlpha { - - UIColor *whiteColorAlpha = [UIColor colorWithWhite:1 alpha:0.533333]; - UIColor *whiteHexColorAlpha = [UIColor hx_colorWithHexRGBAString:@"8fff"]; - - NSAssert(whiteColorAlpha != whiteHexColorAlpha, @"hexColor is not equal to white alpha hexColor"); -} - -- (void)testRGBColor { - - UIColor *greyColor = [UIColor colorWithWhite:0.5 alpha:1]; - UIColor *rgbColor = [UIColor hx_colorWith8BitRed:127.5 green:127.5 blue:127.5]; - - NSAssert(greyColor != rgbColor, @"hexColor is not equal to the grey color"); -} - -@end diff --git a/HexColorsTests/Info.plist b/HexColorsTests/Info.plist deleted file mode 100644 index ba72822..0000000 --- a/HexColorsTests/Info.plist +++ /dev/null @@ -1,24 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - BNDL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - - From 32fffcba5562e34967a6d8ca5ded45261f4c4f5f Mon Sep 17 00:00:00 2001 From: Marius Landwehr Date: Wed, 28 Dec 2016 21:52:00 +0100 Subject: [PATCH 15/31] Tried it with the ID instead of an guess --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index cc7d2be..5b81466 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,4 +2,4 @@ language: objective-c osx_image: xcode8.2 script: - - xcodebuild test -scheme HexColors-iOS-Tests -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 5s,OS=10.2' \ No newline at end of file + - xcodebuild test -scheme HexColors-iOS-Tests -sdk iphonesimulator -destination 'platform=iOS Simulator,id=79C525D3-2383-4201-AC3A-81810F9F4E03' \ No newline at end of file From 13f6d8d89072b00c68a9f68a3b6f9695068913f5 Mon Sep 17 00:00:00 2001 From: Marius Landwehr Date: Wed, 28 Dec 2016 22:02:29 +0100 Subject: [PATCH 16/31] Added Code Coverage --- .travis.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5b81466..ffc65e9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,6 @@ language: objective-c osx_image: xcode8.2 - script: - - xcodebuild test -scheme HexColors-iOS-Tests -sdk iphonesimulator -destination 'platform=iOS Simulator,id=79C525D3-2383-4201-AC3A-81810F9F4E03' \ No newline at end of file + - xcodebuild test -scheme HexColors-iOS-Tests -sdk iphonesimulator -destination 'platform=iOS Simulator,id=79C525D3-2383-4201-AC3A-81810F9F4E03' +after_success: + - bash <(curl -s https://codecov.io/bash) \ No newline at end of file From 74f408f2f126ec0da16bf1fad5110923cede2476 Mon Sep 17 00:00:00 2001 From: Marius Landwehr Date: Wed, 28 Dec 2016 22:09:03 +0100 Subject: [PATCH 17/31] Added CodeCov to Readme --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index cf45269..23c448b 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,9 @@ HexColors ========================= ![Badge w/ Version](https://cocoapod-badges.herokuapp.com/v/HexColors/badge.png) -![Badge w/ Version](https://travis-ci.org/mRs-/HexColors.svg) ![Badge w/ Version](https://cocoapod-badges.herokuapp.com/p/HexColors/badge.png) +![Badge w/ Version](https://travis-ci.org/mRs-/HexColors.svg) +[![codecov](https://codecov.io/gh/mRs-/HexColors/branch/master/graph/badge.svg)](https://codecov.io/gh/mRs-/HexColors) HexColors is an extension for UIColor and NSColor to support for creating colors from a hex string like #FF0088 or 8844FF. Completely rewritten in Swift 3! From 07e2e1f1c5c8b02a09b630f08d0ed2ec5b52ae19 Mon Sep 17 00:00:00 2001 From: Marius Landwehr Date: Wed, 28 Dec 2016 22:42:41 +0100 Subject: [PATCH 18/31] Added HexColors.png --- HexColors.png | Bin 0 -> 54451 bytes README.md | 4 +++- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 HexColors.png diff --git a/HexColors.png b/HexColors.png new file mode 100644 index 0000000000000000000000000000000000000000..1d375a682388e95e4d818df6838add774d22ec01 GIT binary patch literal 54451 zcmY&{TJ8s8M?pvn{np ztth3xJn!>7@B4k{apaHO$9>%Ab?$j3m>6l(Tw}im003xobu=CT03;Lu01*=FzvYt;R zldtt^u~A7ov%md~YYRHkA4;1E;WuphVrFXpeI~jiva-%BQAZa!-A%5%{<?Mz7)1#3%+pQT?3-imL&2+txp*zD zPjh^zcj4YUEUwP{B4F{}+##^*+QqE6w~&w21fycNa<&GmP<*EVEP33R?!F}cduf&j z)KpOQAVXEt+DG~|B9RrG&Sywe@L}MA@=b|b!RlJiix>ZNgh^+FVM@04ct3KBZZ`tA zWWKs~)v3^ex3}qCxL1_S`$zV>R&q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_&J%brJb8m8yp@~wHu#GOgO(+)`X;Gm>Cassn z;^TO*!xiyQ1=N}hO!g|lqLaNjx~4?tuqB06z~LiYTryn{2vGN_S2sPzpm9HULrI%! z=**T^zFOg@&AENYyJ(~aM|O&U%t52c9)-R>J`AStF;j@3R=?kRW)-1Xg+}V#SO6hB z0oTh&K$#N?p|LYxegI%O9Dv8zyPX(_8*-ih(Kq=1_Q!?(R|MSGpE>8y6wb%%^}>6Pje5XXl4xkBf_69Fuwu|WZikCiQ~B^`?YY;nE(*5+;c5~DBthY>Cfb;wM*-? zMVe6w6U7Tf!GP*5ftoXCk7_7#c~ + HexColors +

========================= ![Badge w/ Version](https://cocoapod-badges.herokuapp.com/v/HexColors/badge.png) ![Badge w/ Version](https://cocoapod-badges.herokuapp.com/p/HexColors/badge.png) From 593958bcd71191228ccebc342d89275bfc9869a3 Mon Sep 17 00:00:00 2001 From: Marius Landwehr Date: Wed, 28 Dec 2016 22:44:40 +0100 Subject: [PATCH 19/31] removed more old classes --- Classes/HexColors.h | 100 ------------------------- Classes/HexColors.m | 173 -------------------------------------------- 2 files changed, 273 deletions(-) delete mode 100755 Classes/HexColors.h delete mode 100755 Classes/HexColors.m diff --git a/Classes/HexColors.h b/Classes/HexColors.h deleted file mode 100755 index 75a8395..0000000 --- a/Classes/HexColors.h +++ /dev/null @@ -1,100 +0,0 @@ -// -// HexColor.h -// -// Created by Marius Landwehr on 02.12.12. -// The MIT License (MIT) -// Copyright (c) 2013 Marius Landwehr marius.landwehr@gmail.com -// -// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -#import "TargetConditionals.h" - -#if TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR - #import - #define HXColor UIColor -#else - #import - #define HXColor NSColor -#endif - -@interface HXColor (HexColorAddition) - -/** - Creates a UIColor or NSColor from a HexString like #fff, #ffff, #ff00aa or #ff00aaee. - With complete support for short hand hex values, short hand with short alpha value, full - hex values and full hex values with alpha. - - @param hexString NSString hex string for color generation - @return UIColor / NSColor or nil - */ -+ (nullable HXColor *)hx_colorWithHexString:(nonnull NSString *)hexString __attribute__ ((deprecated("Use '-hx_colorWithHexRGBAString' instead."))); - -/** - Creates a UIColor or NSColor from a HexString like #fff, #ffff, #ff00aa or #ff00aaee. - With complete support for short hand hex values, short hand with short alpha value, full - hex values and full hex values with alpha. To include alpha with the hex string append the values - at the end of the string. - - @param hexString NSString hex string for color generation - @return UIColor / NSColor or nil - */ -+ (nullable HXColor *)hx_colorWithHexRGBAString:(nonnull NSString *)hexString; - -/** - Same implementation as hx_colorWithHexString but you can hand in a normal alpha value from 0 to 1 - - @param hexString NSString hex string for color generation - @param alpha CGFloat from 0 to 1 - @return UIColor / NSColor or nil - */ -+ (nullable HXColor *)hx_colorWithHexString:(nonnull NSString *)hexString alpha:(CGFloat)alpha __attribute__ ((deprecated("Use '-hx_colorWithHexRGBAString :alpha' instead."))); - -/** - Same implementation as hx_colorWithHexRGBAString but you can hand in a normal alpha value from 0 to 1 - - @param hexString NSString hex string for color generation - @param alpha CGFloat from 0 to 1 - @return UIColor / NSColor or nil - */ -+ (nullable HXColor *)hx_colorWithHexRGBAString:(nonnull NSString *)hexString alpha:(CGFloat)alpha; - -/** - Don't like to devide by 255 to get a value between 0 to 1 for creating a color? This helps you create - a UIColor without the hassle, which leads to cleaner code - - @param red NSInteger hand in a value for red between 0 and 255 - @param green NSInteger hand in a value for green between 0 and 255 - @param blue NSInteger hand in a value for blue between 0 and 255 - @return UIColor / NSColor - */ -+ (nonnull HXColor *)hx_colorWith8BitRed:(NSInteger)red green:(NSInteger)green blue:(NSInteger)blue; - -/** - Same implementation as hx_colorWith8BitRed:green:blue but you can hand in a normal alpha value from 0 to 1 - - @param red NSInteger hand in a value for red between 0 and 255 - @param green NSInteger hand in a value for green between 0 and 255 - @param blue NSInteger hand in a value for blue between 0 and 255 - @param alpha CGFloat from 0 to 1 - @return UIColor / NSColor - */ -+ (nonnull HXColor *)hx_colorWith8BitRed:(NSInteger)red green:(NSInteger)green blue:(NSInteger)blue alpha:(CGFloat)alpha; - -@end - - -@interface NSString (hx_StringTansformer) - -/** - Checks for a short hexString like #fff and transform it to a long hexstring like #ffffff - - @return hexString NSString a normal hexString with the length of 7 characters like #ffffff or the initial string - */ -- (nonnull NSString *)hx_hexStringTransformFromThreeCharacters; - -@end \ No newline at end of file diff --git a/Classes/HexColors.m b/Classes/HexColors.m deleted file mode 100755 index 66cabda..0000000 --- a/Classes/HexColors.m +++ /dev/null @@ -1,173 +0,0 @@ -// -// HexColor.m -// -// Created by Marius Landwehr on 02.12.12. -// The MIT License (MIT) -// Copyright (c) 2013 Marius Landwehr marius.landwehr@gmail.com -// -// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -#import "HexColors.h" - -@implementation HXColor (HexColorAddition) - -+ (HXColor *)hx_colorWithHexString:(NSString *)hexString -{ - return [[self class] hx_colorWithHexString:hexString alpha:1.0]; -} - -+ (HXColor *)hx_colorWithHexRGBAString:(NSString *)hexString -{ - return [[self class] hx_colorWithHexRGBAString:hexString alpha:1.0]; -} - -+ (HXColor *)hx_colorWithHexRGBAString:(NSString *)hexString alpha:(CGFloat)alpha -{ - // We found an empty string, we are returning nothing - if (hexString.length == 0) { - return nil; - } - - // Check for hash and add the missing hash - if('#' != [hexString characterAtIndex:0]) { - hexString = [NSString stringWithFormat:@"#%@", hexString]; - } - - // returning no object on wrong alpha values - NSArray *validHexStringLengths = @[@4, @5, @7, @9]; - NSNumber *hexStringLengthNumber = [NSNumber numberWithUnsignedInteger:hexString.length]; - if ([validHexStringLengths indexOfObject:hexStringLengthNumber] == NSNotFound) { - return nil; - } - - // if the hex string is 5 or 9 we are ignoring the alpha value and we are using the value from the hex string instead - CGFloat handedInAlpha = alpha; - if (5 == hexString.length || 9 == hexString.length) { - NSString *alphaHex; - if (5 == hexString.length) { - alphaHex = [hexString substringWithRange:NSMakeRange(4, 1)]; - } else { - alphaHex = [hexString substringWithRange:NSMakeRange(7, 2)]; - } - if (1 == alphaHex.length) alphaHex = [NSString stringWithFormat:@"%@%@", alphaHex, alphaHex]; - //hexString = [NSString stringWithFormat:@"#%@", [hexString substringFromIndex:9 == hexString.length ? 7 : 3]]; - hexString = [NSString stringWithFormat:@"#%@", [hexString substringWithRange:NSMakeRange(1, 9 == hexString.length ? 6 : 3)]]; - unsigned alpha_u = [[self class] hx_hexValueToUnsigned:alphaHex]; - handedInAlpha = ((CGFloat) alpha_u) / 255.0; - } - - // check for 3 character HexStrings - hexString = [hexString hx_hexStringTransformFromThreeCharacters]; - - NSString *redHex = [NSString stringWithFormat:@"0x%@", [hexString substringWithRange:NSMakeRange(1, 2)]]; - unsigned redInt = [[self class] hx_hexValueToUnsigned:redHex]; - - NSString *greenHex = [NSString stringWithFormat:@"0x%@", [hexString substringWithRange:NSMakeRange(3, 2)]]; - unsigned greenInt = [[self class] hx_hexValueToUnsigned:greenHex]; - - NSString *blueHex = [NSString stringWithFormat:@"0x%@", [hexString substringWithRange:NSMakeRange(5, 2)]]; - unsigned blueInt = [[self class] hx_hexValueToUnsigned:blueHex]; - - HXColor *color = [HXColor hx_colorWith8BitRed:redInt green:greenInt blue:blueInt alpha:handedInAlpha]; - - return color; -} - -+ (HXColor *)hx_colorWithHexString:(NSString *)hexString alpha:(CGFloat)alpha -{ - // We found an empty string, we are returning nothing - if (hexString.length == 0) { - return nil; - } - - // Check for hash and add the missing hash - if('#' != [hexString characterAtIndex:0]) { - hexString = [NSString stringWithFormat:@"#%@", hexString]; - } - - // returning no object on wrong alpha values - NSArray *validHexStringLengths = @[@4, @5, @7, @9]; - NSNumber *hexStringLengthNumber = [NSNumber numberWithUnsignedInteger:hexString.length]; - if ([validHexStringLengths indexOfObject:hexStringLengthNumber] == NSNotFound) { - return nil; - } - - // if the hex string is 5 or 9 we are ignoring the alpha value and we are using the value from the hex string instead - CGFloat handedInAlpha = alpha; - if (5 == hexString.length || 9 == hexString.length) { - NSString * alphaHex = [hexString substringWithRange:NSMakeRange(1, 9 == hexString.length ? 2 : 1)]; - if (1 == alphaHex.length) alphaHex = [NSString stringWithFormat:@"%@%@", alphaHex, alphaHex]; - hexString = [NSString stringWithFormat:@"#%@", [hexString substringFromIndex:9 == hexString.length ? 3 : 2]]; - unsigned alpha_u = [[self class] hx_hexValueToUnsigned:alphaHex]; - handedInAlpha = ((CGFloat) alpha_u) / 255.0; - } - - // check for 3 character HexStrings - hexString = [hexString hx_hexStringTransformFromThreeCharacters]; - - NSString *redHex = [NSString stringWithFormat:@"0x%@", [hexString substringWithRange:NSMakeRange(1, 2)]]; - unsigned redInt = [[self class] hx_hexValueToUnsigned:redHex]; - - NSString *greenHex = [NSString stringWithFormat:@"0x%@", [hexString substringWithRange:NSMakeRange(3, 2)]]; - unsigned greenInt = [[self class] hx_hexValueToUnsigned:greenHex]; - - NSString *blueHex = [NSString stringWithFormat:@"0x%@", [hexString substringWithRange:NSMakeRange(5, 2)]]; - unsigned blueInt = [[self class] hx_hexValueToUnsigned:blueHex]; - - HXColor *color = [HXColor hx_colorWith8BitRed:redInt green:greenInt blue:blueInt alpha:handedInAlpha]; - - return color; -} - -+ (HXColor *)hx_colorWith8BitRed:(NSInteger)red green:(NSInteger)green blue:(NSInteger)blue -{ - return [[self class] hx_colorWith8BitRed:red green:green blue:blue alpha:1.0]; -} - -+ (HXColor *)hx_colorWith8BitRed:(NSInteger)red green:(NSInteger)green blue:(NSInteger)blue alpha:(CGFloat)alpha -{ - HXColor *color = nil; -#if (TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE) - color = [HXColor colorWithRed:(float)red/255 green:(float)green/255 blue:(float)blue/255 alpha:alpha]; -#else - color = [HXColor colorWithCalibratedRed:(float)red/255 green:(float)green/255 blue:(float)blue/255 alpha:alpha]; -#endif - - return color; -} - -+ (unsigned)hx_hexValueToUnsigned:(NSString *)hexValue -{ - unsigned value = 0; - - NSScanner *hexValueScanner = [NSScanner scannerWithString:hexValue]; - [hexValueScanner scanHexInt:&value]; - - return value; -} - - -@end - -@implementation NSString (hx_StringTansformer) - -- (NSString *)hx_hexStringTransformFromThreeCharacters; -{ - if(self.length == 4) - { - NSString * hexString = [NSString stringWithFormat:@"#%1$c%1$c%2$c%2$c%3$c%3$c", - [self characterAtIndex:1], - [self characterAtIndex:2], - [self characterAtIndex:3]]; - return hexString; - } - - return self; -} - -@end From e9ac1a47050380aba7c2dfa321c53129e71a8298 Mon Sep 17 00:00:00 2001 From: Marius Landwehr Date: Wed, 28 Dec 2016 23:42:23 +0100 Subject: [PATCH 20/31] Added macOS Tests --- .travis.yml | 1 + .../HexColors_macOSTests.swift | 136 ++++++++++++++++-- .../xcschemes/HexColors-macOS-Tests.xcscheme | 3 +- 3 files changed, 125 insertions(+), 15 deletions(-) diff --git a/.travis.yml b/.travis.yml index ffc65e9..b76a812 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,5 +2,6 @@ language: objective-c osx_image: xcode8.2 script: - xcodebuild test -scheme HexColors-iOS-Tests -sdk iphonesimulator -destination 'platform=iOS Simulator,id=79C525D3-2383-4201-AC3A-81810F9F4E03' + - xcodebuild test -scheme HexColors-macOS-Tests after_success: - bash <(curl -s https://codecov.io/bash) \ No newline at end of file diff --git a/HexColors-macOSTests/HexColors_macOSTests.swift b/HexColors-macOSTests/HexColors_macOSTests.swift index eb7acdd..0dc0644 100644 --- a/HexColors-macOSTests/HexColors_macOSTests.swift +++ b/HexColors-macOSTests/HexColors_macOSTests.swift @@ -11,26 +11,134 @@ import XCTest class HexColors_macOSTests: XCTestCase { - override func setUp() { - super.setUp() - // Put setup code here. This method is called before the invocation of each test method in the class. + func testCantCreateColorFromEmptyString() { + + XCTAssertNil(NSColor(hex: "")) } - override func tearDown() { - // Put teardown code here. This method is called after the invocation of each test method in the class. - super.tearDown() + func testCantCreateColorFromEmptyStringWithAlpha() { + + XCTAssertNil(NSColor(hex: "", alpha: 0.2)) } - func testExample() { - // This is an example of a functional test case. - // Use XCTAssert and related functions to verify your tests produce the correct results. + func testCantCreateColorFromStringThatsNotHexConform() { + + XCTAssertNil(NSColor(hex: "Wow what a nice view!")) } - func testPerformanceExample() { - // This is an example of a performance test case. - self.measure { - // Put the code you want to measure the time of here. - } + func testCantCreateColorFromStringThatsNotHexConformWithAlpha() { + + XCTAssertNil(NSColor(hex: "Wow what a nice view!", alpha: 0.2)) + } + + func testCantCreateColorFromStringWith3CharactersThatAreNotInHexRange() { + XCTAssertNil(NSColor(hex: "ZXY")) + } + + func testCantCreateColorFromStringWith3CharactersThatAreNotInHexRangeWithAlpha() { + XCTAssertNil(NSColor(hex: "ZXY", alpha: 0.2)) + } + + func testCantCreateColorFromStringWith4CharactersThatAreNotInHexRange() { + XCTAssertNil(NSColor(hex: "ZXYL")) + } + + func testCantCreateColorFromStringWith4CharactersThatAreNotInHexRangeWithAlpha() { + XCTAssertNil(NSColor(hex: "ZXYL", alpha: 0.2)) + } + + func testCantCreateColorFromStringWith6CharactersThatAreNotInHexRange() { + XCTAssertNil(NSColor(hex: "ZXYLPK")) + } + + func testCantCreateColorFromStringWith6CharactersThatAreNotInHexRangeWithAlpha() { + XCTAssertNil(NSColor(hex: "ZXYLPK", alpha: 0.2)) + } + + func testCantCreateColorFromStringWith8CharactersThatAreNotInHexRange() { + XCTAssertNil(NSColor(hex: "ZXYLPKXX")) + } + + func testCantCreateColorFromStringWith8CharactersThatAreNotInHexRangeWithAlpha() { + XCTAssertNil(NSColor(hex: "ZXYLPKXX", alpha: 0.2)) + } + + func testCanCreateColorFromValidHexStringWith3Characters() { + XCTAssertEqual(NSColor(hex: "FFF"), NSColor(calibratedRed: 1, green: 1, blue: 1, alpha: 1)) + } + + func testCanCreateColorFromValidHexStringWith3CharactersAndHashPrefix() { + XCTAssertEqual(NSColor(hex: "#FFF"), NSColor(calibratedRed: 1, green: 1, blue: 1, alpha: 1)) + } + + func testCanCreateColorFromValidHexStringWith3CharactersAndAlpha() { + XCTAssertEqual(NSColor(hex: "FFF", alpha: 0.2), NSColor(calibratedRed: 1, green: 1, blue: 1, alpha: 0.2)) + } + + func testCanCreateColorFromValidHexStringWith3CharactersAndAlphaAndHashPrefix() { + XCTAssertEqual(NSColor(hex: "#FFF", alpha: 0.2), NSColor(calibratedRed: 1, green: 1, blue: 1, alpha: 0.2)) + } + + func testCanCreateColorFromValidHexStringWith4Characters() { + XCTAssertEqual(NSColor(hex: "FFF0"), NSColor(calibratedRed: 1, green: 1, blue: 1, alpha: 0)) + } + + func testCanCreateColorFromValidHexStringWith4CharactersAndHashPrefix() { + XCTAssertEqual(NSColor(hex: "#FFF0"), NSColor(calibratedRed: 1, green: 1, blue: 1, alpha: 0)) + } + + func testCanCreateColorFromValidHexStringWith4CharactersAndAlpha() { + XCTAssertEqual(NSColor(hex: "FFFF", alpha: 0.2), NSColor(calibratedRed: 1, green: 1, blue: 1, alpha: 0.2)) + } + + func testCanCreateColorFromValidHexStringWith4CharactersAndAlphaAndHashPrefix() { + XCTAssertEqual(NSColor(hex: "#FFFF", alpha: 0.2), NSColor(calibratedRed: 1, green: 1, blue: 1, alpha: 0.2)) + } + + func testCanCreateColorFromValidHexStringWith6Characters() { + XCTAssertEqual(NSColor(hex: "FF00FF"), NSColor(calibratedRed: 1, green: 0, blue: 1, alpha: 1)) + } + + func testCanCreateColorFromValidHexStringWith6CharactersAndHashPrefix() { + XCTAssertEqual(NSColor(hex: "#FF00FF"), NSColor(calibratedRed: 1, green: 0, blue: 1, alpha: 1)) + } + + func testCanCreateColorFromValidHexStringWith6CharactersAndAlpha() { + XCTAssertEqual(NSColor(hex: "FF00FF", alpha: 0.2), NSColor(calibratedRed: 1, green: 0, blue: 1, alpha: 0.2)) + } + + func testCanCreateColorFromValidHexStringWith6CharactersAndAlphaAndHashPrefix() { + XCTAssertEqual(NSColor(hex: "#FF00FF", alpha: 0.2), NSColor(calibratedRed: 1, green: 0, blue: 1, alpha: 0.2)) + } + + func testCanCreateColorFromValidHexStringWith8Characters() { + XCTAssertEqual(NSColor(hex: "FF00FF00"), NSColor(calibratedRed: 1, green: 0, blue: 1, alpha: 0)) + } + + func testCanCreateColorFromValidHexStringWith8CharactersAndHashPrefix() { + XCTAssertEqual(NSColor(hex: "#FF00FF00"), NSColor(calibratedRed: 1, green: 0, blue: 1, alpha: 0)) + } + + func testCanCreateColorFromValidHexStringWith8CharactersAndAlpha() { + XCTAssertEqual(NSColor(hex: "FF00FFFF", alpha: 0.2), NSColor(calibratedRed: 1, green: 0, blue: 1, alpha: 0.2)) + } + + func testCanCreateColorFromValidHexStringWith8CharactersAndAlphaAndHashPrefix() { + XCTAssertEqual(NSColor(hex: "#FF00FFFF", alpha: 0.2), NSColor(calibratedRed: 1, green: 0, blue: 1, alpha: 0.2)) + } + + func testCanTransformToColorAndBackToHexString() { + let hexString = "#ff00ff" + let color = NSColor(hex: hexString) + + XCTAssertEqual(hexString, color?.hex) + } + + func testCanTransformToColorWithAlphaAndBackToHexString() { + let hexString = "#ff00ff00" + let color = NSColor(hex: hexString) + + XCTAssertEqual(hexString, color?.hex) } } diff --git a/HexColors.xcodeproj/xcshareddata/xcschemes/HexColors-macOS-Tests.xcscheme b/HexColors.xcodeproj/xcshareddata/xcschemes/HexColors-macOS-Tests.xcscheme index f1cc8bc..757d7b0 100644 --- a/HexColors.xcodeproj/xcshareddata/xcschemes/HexColors-macOS-Tests.xcscheme +++ b/HexColors.xcodeproj/xcshareddata/xcschemes/HexColors-macOS-Tests.xcscheme @@ -10,7 +10,8 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" - shouldUseLaunchSchemeArgsEnv = "YES"> + shouldUseLaunchSchemeArgsEnv = "YES" + codeCoverageEnabled = "YES"> From 498739d586cd4392aba33829d6deec49cfcb835b Mon Sep 17 00:00:00 2001 From: Marius Landwehr Date: Wed, 28 Dec 2016 23:58:12 +0100 Subject: [PATCH 21/31] Added Swift Package Manager and moved file to Sources --- HexColors.xcodeproj/project.pbxproj | 8 +++++++- Package.swift | 19 +++++++++++++++++++ {Classes => Sources}/HexColors.swift | 0 3 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 Package.swift rename {Classes => Sources}/HexColors.swift (100%) diff --git a/HexColors.xcodeproj/project.pbxproj b/HexColors.xcodeproj/project.pbxproj index 04a3f83..3b1880f 100644 --- a/HexColors.xcodeproj/project.pbxproj +++ b/HexColors.xcodeproj/project.pbxproj @@ -35,7 +35,7 @@ /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ - 293AB3341E111E88004A4946 /* HexColors.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = HexColors.swift; path = Classes/HexColors.swift; sourceTree = ""; }; + 293AB3341E111E88004A4946 /* HexColors.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = HexColors.swift; path = Sources/HexColors.swift; sourceTree = ""; }; 293AB33C1E111F0B004A4946 /* HexColors.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = HexColors.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 293AB33E1E111F0B004A4946 /* HexColors-iOS.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "HexColors-iOS.h"; sourceTree = ""; }; 293AB33F1E111F0B004A4946 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; @@ -48,6 +48,7 @@ 293AB3611E111F53004A4946 /* HexColors-macOSTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "HexColors-macOSTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; 293AB3661E111F53004A4946 /* HexColors_macOSTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HexColors_macOSTests.swift; sourceTree = ""; }; 293AB3681E111F53004A4946 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 29E034CD1E1477EF00BC16BC /* Package.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Package.swift; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -87,6 +88,7 @@ 293AB3161E111E68004A4946 = { isa = PBXGroup; children = ( + 29E034CD1E1477EF00BC16BC /* Package.swift */, 293AB3361E111E96004A4946 /* Classes */, 293AB33D1E111F0B004A4946 /* HexColors-iOS */, 293AB3481E111F0B004A4946 /* HexColors-iOSTests */, @@ -636,6 +638,7 @@ 293AB34F1E111F0B004A4946 /* Release */, ); defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; }; 293AB3501E111F0B004A4946 /* Build configuration list for PBXNativeTarget "HexColors-iOSTests" */ = { isa = XCConfigurationList; @@ -644,6 +647,7 @@ 293AB3521E111F0B004A4946 /* Release */, ); defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; }; 293AB36A1E111F53004A4946 /* Build configuration list for PBXNativeTarget "HexColors-macOS" */ = { isa = XCConfigurationList; @@ -652,6 +656,7 @@ 293AB36C1E111F53004A4946 /* Release */, ); defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; }; 293AB36D1E111F53004A4946 /* Build configuration list for PBXNativeTarget "HexColors-macOSTests" */ = { isa = XCConfigurationList; @@ -660,6 +665,7 @@ 293AB36F1E111F53004A4946 /* Release */, ); defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; }; /* End XCConfigurationList section */ }; diff --git a/Package.swift b/Package.swift new file mode 100644 index 0000000..252cae5 --- /dev/null +++ b/Package.swift @@ -0,0 +1,19 @@ +// +// HexColors.swift +// +// Created by Marius Landwehr on 28.12.16. +// The MIT License (MIT) +// Copyright (c) 2016 Marius Landwehr marius.landwehr@gmail.com +// +// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// + +import PackageDescription + +let package = Package( + name: "HexColors" +) diff --git a/Classes/HexColors.swift b/Sources/HexColors.swift similarity index 100% rename from Classes/HexColors.swift rename to Sources/HexColors.swift From 14cb7173362080e94f88afa4c3296707334ed5a5 Mon Sep 17 00:00:00 2001 From: Marius Landwehr Date: Thu, 29 Dec 2016 11:20:46 +0100 Subject: [PATCH 22/31] removed automatic test for macOS --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index b76a812..ffc65e9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,6 +2,5 @@ language: objective-c osx_image: xcode8.2 script: - xcodebuild test -scheme HexColors-iOS-Tests -sdk iphonesimulator -destination 'platform=iOS Simulator,id=79C525D3-2383-4201-AC3A-81810F9F4E03' - - xcodebuild test -scheme HexColors-macOS-Tests after_success: - bash <(curl -s https://codecov.io/bash) \ No newline at end of file From 2256a618de40320d128235ea49de8bb308872fd7 Mon Sep 17 00:00:00 2001 From: Marius Landwehr Date: Thu, 29 Dec 2016 11:25:54 +0100 Subject: [PATCH 23/31] Updated Readme file for 5.0.0 --- README.md | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index ca6801a..0767e2b 100644 --- a/README.md +++ b/README.md @@ -11,31 +11,31 @@ HexColors is an extension for UIColor and NSColor to support for creating colors If you want to use this in Objective-C jump to the 3.X version Tag. -#RELEASE 4.0.0 -Completely rewritten in Swift 3 to get the real magic going on! +#RELEASE 5.0.0 +Completely new and fresh in Swift 3. #Example iOS ``` swift -// with hash let colorWithHex = UIColor(hex: "#ff8942") - -// without hash -let secondColorWithHex = UIColor(hex: "ff8942") - -// short handling -let shortColorWithHex = UIColor(hex: "fff") +let colorWithoutHex = UIColor(hex: "ff8942") +let colorWithHexAndAlhpa = UIColor(hex: "#ff8942DF") +let colorWithoutHexAndAlhpa = UIColor(hex: "ff8942DF") +let shortColorWithHex = UIColor(hex: "#fff") +let shortColorWithoutHex = UIColor(hex: "fff") +let shortColorWithHexAndAlpha = UIColor(hex: "#FFFD") +let shortColorWithoutHexAndAlpha = UIColor(hex: "#FFFD") ``` #Example macOS ``` swift -// with hash let colorWithHex = NSColor(hex: "#ff8942") - -// without hash -let secondColorWithHex = NSColor(hex: "ff8942") - -// short handling -let shortColorWithHex = NSColor(hex: "fff") +let colorWithoutHex = NSColor(hex: "ff8942") +let colorWithHexAndAlhpa = NSColor(hex: "#ff8942DF") +let colorWithoutHexAndAlhpa = NSColor(hex: "ff8942DF") +let shortColorWithHex = NSColor(hex: "#fff") +let shortColorWithoutHex = NSColor(hex: "fff") +let shortColorWithHexAndAlpha = NSColor(hex: "#FFFD") +let shortColorWithoutHexAndAlpha = NSColor(hex: "#FFFD") ``` #Installation From bac35ff68d14a5d362a2803699869b5544a318f1 Mon Sep 17 00:00:00 2001 From: Marius Landwehr Date: Sun, 8 Jan 2017 11:25:32 +0100 Subject: [PATCH 24/31] Added support for watchOS and tvOS --- Sources/HexColors.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/HexColors.swift b/Sources/HexColors.swift index 5cb09c8..6f62c99 100644 --- a/Sources/HexColors.swift +++ b/Sources/HexColors.swift @@ -31,7 +31,7 @@ public extension HexColor { return nil } - #if os(iOS) + #if os(iOS) || os(watchOS) || os(tvOS) self.init(red: components.red, green: components.green, blue: components.blue, alpha: alpha ?? components.alpha) #else self.init(calibratedRed: components.red, green: components.green, blue: components.blue, alpha: alpha ?? components.alpha) From 5bfd0676bafe232fcc4d1fc88f7b9cbca4570ec1 Mon Sep 17 00:00:00 2001 From: Marius Landwehr Date: Sun, 8 Jan 2017 11:25:44 +0100 Subject: [PATCH 25/31] Edit Acces Control --- Sources/HexColors.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/HexColors.swift b/Sources/HexColors.swift index 6f62c99..9861769 100644 --- a/Sources/HexColors.swift +++ b/Sources/HexColors.swift @@ -51,7 +51,7 @@ public extension HexColor { return String(format: "#%06x", rgb) } - fileprivate enum `Type` { + private enum `Type` { case RGBshort(rgb: Hex) case RGBshortAlpha(rgba: Hex) @@ -140,7 +140,7 @@ public extension HexColor { } } -fileprivate extension String { +private extension String { mutating func removeHashIfNecessary() { if hasPrefix("#") { From 2e2590d875b2946af69acce30817947b55469bc4 Mon Sep 17 00:00:00 2001 From: Marius Landwehr Date: Sun, 8 Jan 2017 11:47:49 +0100 Subject: [PATCH 26/31] Added documentation and new init --- Sources/HexColors.swift | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Sources/HexColors.swift b/Sources/HexColors.swift index 9861769..55e5967 100644 --- a/Sources/HexColors.swift +++ b/Sources/HexColors.swift @@ -23,10 +23,10 @@ public extension HexColor { typealias Hex = String - convenience init?(hex string: Hex, alpha: CGFloat? = nil) { + convenience init?(_ hex: Hex, with alpha: CGFloat? = nil) { guard - let hexType = Type(from: string), + let hexType = Type(from: hex), let components = hexType.components() else { return nil } @@ -38,7 +38,8 @@ public extension HexColor { #endif } - var hex: Hex? { + /// The string hex value representation of the current color + var hex: Hex { var r: CGFloat = 0, g: CGFloat = 0, b: CGFloat = 0, a: CGFloat = 0, rgb: Int getRed(&r, green: &g, blue: &b, alpha: &a) From c09c0f1d1bbf17f80a2f47b26e1cb792cf4505e6 Mon Sep 17 00:00:00 2001 From: Marius Landwehr Date: Sun, 8 Jan 2017 11:57:24 +0100 Subject: [PATCH 27/31] Swift 3 Syntax And RayWenderlich Style Guide --- HexColors-iOSTests/HexColors_iOSTests.swift | 260 +++++++++--------- .../HexColors_macOSTests.swift | 260 +++++++++--------- .../xcschemes/HexColors-iOS-Tests.xcscheme | 43 +++ .../xcschemes/HexColors-macOS-Tests.xcscheme | 45 ++- Sources/HexColors.swift | 240 ++++++++-------- 5 files changed, 465 insertions(+), 383 deletions(-) diff --git a/HexColors-iOSTests/HexColors_iOSTests.swift b/HexColors-iOSTests/HexColors_iOSTests.swift index 987d597..baf8d98 100644 --- a/HexColors-iOSTests/HexColors_iOSTests.swift +++ b/HexColors-iOSTests/HexColors_iOSTests.swift @@ -10,134 +10,134 @@ import XCTest @testable import HexColors class HexColors_iOSTests: XCTestCase { - - func testCantCreateColorFromEmptyString() { - - XCTAssertNil(UIColor(hex: "")) - } - - func testCantCreateColorFromEmptyStringWithAlpha() { - - XCTAssertNil(UIColor(hex: "", alpha: 0.2)) - } - - func testCantCreateColorFromStringThatsNotHexConform() { - - XCTAssertNil(UIColor(hex: "Wow what a nice view!")) - } - - func testCantCreateColorFromStringThatsNotHexConformWithAlpha() { - - XCTAssertNil(UIColor(hex: "Wow what a nice view!", alpha: 0.2)) - } - - func testCantCreateColorFromStringWith3CharactersThatAreNotInHexRange() { - XCTAssertNil(UIColor(hex: "ZXY")) - } - - func testCantCreateColorFromStringWith3CharactersThatAreNotInHexRangeWithAlpha() { - XCTAssertNil(UIColor(hex: "ZXY", alpha: 0.2)) - } - - func testCantCreateColorFromStringWith4CharactersThatAreNotInHexRange() { - XCTAssertNil(UIColor(hex: "ZXYL")) - } - - func testCantCreateColorFromStringWith4CharactersThatAreNotInHexRangeWithAlpha() { - XCTAssertNil(UIColor(hex: "ZXYL", alpha: 0.2)) - } - - func testCantCreateColorFromStringWith6CharactersThatAreNotInHexRange() { - XCTAssertNil(UIColor(hex: "ZXYLPK")) - } - - func testCantCreateColorFromStringWith6CharactersThatAreNotInHexRangeWithAlpha() { - XCTAssertNil(UIColor(hex: "ZXYLPK", alpha: 0.2)) - } - - func testCantCreateColorFromStringWith8CharactersThatAreNotInHexRange() { - XCTAssertNil(UIColor(hex: "ZXYLPKXX")) - } - - func testCantCreateColorFromStringWith8CharactersThatAreNotInHexRangeWithAlpha() { - XCTAssertNil(UIColor(hex: "ZXYLPKXX", alpha: 0.2)) - } - - func testCanCreateColorFromValidHexStringWith3Characters() { - XCTAssertEqual(UIColor(hex: "FFF"), UIColor(red: 1, green: 1, blue: 1, alpha: 1)) - } - - func testCanCreateColorFromValidHexStringWith3CharactersAndHashPrefix() { - XCTAssertEqual(UIColor(hex: "#FFF"), UIColor(red: 1, green: 1, blue: 1, alpha: 1)) - } - - func testCanCreateColorFromValidHexStringWith3CharactersAndAlpha() { - XCTAssertEqual(UIColor(hex: "FFF", alpha: 0.2), UIColor(red: 1, green: 1, blue: 1, alpha: 0.2)) - } - - func testCanCreateColorFromValidHexStringWith3CharactersAndAlphaAndHashPrefix() { - XCTAssertEqual(UIColor(hex: "#FFF", alpha: 0.2), UIColor(red: 1, green: 1, blue: 1, alpha: 0.2)) - } - - func testCanCreateColorFromValidHexStringWith4Characters() { - XCTAssertEqual(UIColor(hex: "FFF0"), UIColor(red: 1, green: 1, blue: 1, alpha: 0)) - } - - func testCanCreateColorFromValidHexStringWith4CharactersAndHashPrefix() { - XCTAssertEqual(UIColor(hex: "#FFF0"), UIColor(red: 1, green: 1, blue: 1, alpha: 0)) - } - - func testCanCreateColorFromValidHexStringWith4CharactersAndAlpha() { - XCTAssertEqual(UIColor(hex: "FFFF", alpha: 0.2), UIColor(red: 1, green: 1, blue: 1, alpha: 0.2)) - } - - func testCanCreateColorFromValidHexStringWith4CharactersAndAlphaAndHashPrefix() { - XCTAssertEqual(UIColor(hex: "#FFFF", alpha: 0.2), UIColor(red: 1, green: 1, blue: 1, alpha: 0.2)) - } - - func testCanCreateColorFromValidHexStringWith6Characters() { - XCTAssertEqual(UIColor(hex: "FF00FF"), UIColor(red: 1, green: 0, blue: 1, alpha: 1)) - } - - func testCanCreateColorFromValidHexStringWith6CharactersAndHashPrefix() { - XCTAssertEqual(UIColor(hex: "#FF00FF"), UIColor(red: 1, green: 0, blue: 1, alpha: 1)) - } - - func testCanCreateColorFromValidHexStringWith6CharactersAndAlpha() { - XCTAssertEqual(UIColor(hex: "FF00FF", alpha: 0.2), UIColor(red: 1, green: 0, blue: 1, alpha: 0.2)) - } - - func testCanCreateColorFromValidHexStringWith6CharactersAndAlphaAndHashPrefix() { - XCTAssertEqual(UIColor(hex: "#FF00FF", alpha: 0.2), UIColor(red: 1, green: 0, blue: 1, alpha: 0.2)) - } - - func testCanCreateColorFromValidHexStringWith8Characters() { - XCTAssertEqual(UIColor(hex: "FF00FF00"), UIColor(red: 1, green: 0, blue: 1, alpha: 0)) - } - - func testCanCreateColorFromValidHexStringWith8CharactersAndHashPrefix() { - XCTAssertEqual(UIColor(hex: "#FF00FF00"), UIColor(red: 1, green: 0, blue: 1, alpha: 0)) - } - - func testCanCreateColorFromValidHexStringWith8CharactersAndAlpha() { - XCTAssertEqual(UIColor(hex: "FF00FFFF", alpha: 0.2), UIColor(red: 1, green: 0, blue: 1, alpha: 0.2)) - } - - func testCanCreateColorFromValidHexStringWith8CharactersAndAlphaAndHashPrefix() { - XCTAssertEqual(UIColor(hex: "#FF00FFFF", alpha: 0.2), UIColor(red: 1, green: 0, blue: 1, alpha: 0.2)) - } - - func testCanTransformToColorAndBackToHexString() { - let hexString = "#ff00ff" - let color = UIColor(hex: hexString) - - XCTAssertEqual(hexString, color?.hex) - } - - func testCanTransformToColorWithAlphaAndBackToHexString() { - let hexString = "#ff00ff00" - let color = UIColor(hex: hexString) - - XCTAssertEqual(hexString, color?.hex) - } + + func testCantCreateColorFromEmptyString() { + + XCTAssertNil(UIColor("")) + } + + func testCantCreateColorFromEmptyStringWithAlpha() { + + XCTAssertNil(UIColor("", alpha: 0.2)) + } + + func testCantCreateColorFromStringThatsNotHexConform() { + + XCTAssertNil(UIColor("Wow what a nice view!")) + } + + func testCantCreateColorFromStringThatsNotHexConformWithAlpha() { + + XCTAssertNil(UIColor("Wow what a nice view!", alpha: 0.2)) + } + + func testCantCreateColorFromStringWith3CharactersThatAreNotInHexRange() { + XCTAssertNil(UIColor("ZXY")) + } + + func testCantCreateColorFromStringWith3CharactersThatAreNotInHexRangeWithAlpha() { + XCTAssertNil(UIColor("ZXY", alpha: 0.2)) + } + + func testCantCreateColorFromStringWith4CharactersThatAreNotInHexRange() { + XCTAssertNil(UIColor("ZXYL")) + } + + func testCantCreateColorFromStringWith4CharactersThatAreNotInHexRangeWithAlpha() { + XCTAssertNil(UIColor("ZXYL", alpha: 0.2)) + } + + func testCantCreateColorFromStringWith6CharactersThatAreNotInHexRange() { + XCTAssertNil(UIColor("ZXYLPK")) + } + + func testCantCreateColorFromStringWith6CharactersThatAreNotInHexRangeWithAlpha() { + XCTAssertNil(UIColor("ZXYLPK", alpha: 0.2)) + } + + func testCantCreateColorFromStringWith8CharactersThatAreNotInHexRange() { + XCTAssertNil(UIColor("ZXYLPKXX")) + } + + func testCantCreateColorFromStringWith8CharactersThatAreNotInHexRangeWithAlpha() { + XCTAssertNil(UIColor("ZXYLPKXX", alpha: 0.2)) + } + + func testCanCreateColorFromValidHexStringWith3Characters() { + XCTAssertEqual(UIColor("FFF"), UIColor(red: 1, green: 1, blue: 1, alpha: 1)) + } + + func testCanCreateColorFromValidHexStringWith3CharactersAndHashPrefix() { + XCTAssertEqual(UIColor("#FFF"), UIColor(red: 1, green: 1, blue: 1, alpha: 1)) + } + + func testCanCreateColorFromValidHexStringWith3CharactersAndAlpha() { + XCTAssertEqual(UIColor("FFF", alpha: 0.2), UIColor(red: 1, green: 1, blue: 1, alpha: 0.2)) + } + + func testCanCreateColorFromValidHexStringWith3CharactersAndAlphaAndHashPrefix() { + XCTAssertEqual(UIColor("#FFF", alpha: 0.2), UIColor(red: 1, green: 1, blue: 1, alpha: 0.2)) + } + + func testCanCreateColorFromValidHexStringWith4Characters() { + XCTAssertEqual(UIColor("FFF0"), UIColor(red: 1, green: 1, blue: 1, alpha: 0)) + } + + func testCanCreateColorFromValidHexStringWith4CharactersAndHashPrefix() { + XCTAssertEqual(UIColor("#FFF0"), UIColor(red: 1, green: 1, blue: 1, alpha: 0)) + } + + func testCanCreateColorFromValidHexStringWith4CharactersAndAlpha() { + XCTAssertEqual(UIColor("FFFF", alpha: 0.2), UIColor(red: 1, green: 1, blue: 1, alpha: 0.2)) + } + + func testCanCreateColorFromValidHexStringWith4CharactersAndAlphaAndHashPrefix() { + XCTAssertEqual(UIColor("#FFFF", alpha: 0.2), UIColor(red: 1, green: 1, blue: 1, alpha: 0.2)) + } + + func testCanCreateColorFromValidHexStringWith6Characters() { + XCTAssertEqual(UIColor("FF00FF"), UIColor(red: 1, green: 0, blue: 1, alpha: 1)) + } + + func testCanCreateColorFromValidHexStringWith6CharactersAndHashPrefix() { + XCTAssertEqual(UIColor("#FF00FF"), UIColor(red: 1, green: 0, blue: 1, alpha: 1)) + } + + func testCanCreateColorFromValidHexStringWith6CharactersAndAlpha() { + XCTAssertEqual(UIColor("FF00FF", alpha: 0.2), UIColor(red: 1, green: 0, blue: 1, alpha: 0.2)) + } + + func testCanCreateColorFromValidHexStringWith6CharactersAndAlphaAndHashPrefix() { + XCTAssertEqual(UIColor("#FF00FF", alpha: 0.2), UIColor(red: 1, green: 0, blue: 1, alpha: 0.2)) + } + + func testCanCreateColorFromValidHexStringWith8Characters() { + XCTAssertEqual(UIColor("FF00FF00"), UIColor(red: 1, green: 0, blue: 1, alpha: 0)) + } + + func testCanCreateColorFromValidHexStringWith8CharactersAndHashPrefix() { + XCTAssertEqual(UIColor("#FF00FF00"), UIColor(red: 1, green: 0, blue: 1, alpha: 0)) + } + + func testCanCreateColorFromValidHexStringWith8CharactersAndAlpha() { + XCTAssertEqual(UIColor("FF00FFFF", alpha: 0.2), UIColor(red: 1, green: 0, blue: 1, alpha: 0.2)) + } + + func testCanCreateColorFromValidHexStringWith8CharactersAndAlphaAndHashPrefix() { + XCTAssertEqual(UIColor("#FF00FFFF", alpha: 0.2), UIColor(red: 1, green: 0, blue: 1, alpha: 0.2)) + } + + func testCanTransformToColorAndBackToHexString() { + let hexString = "#ff00ff" + let color = UIColor(hexString) + + XCTAssertEqual(hexString, color?.hex) + } + + func testCanTransformToColorWithAlphaAndBackToHexString() { + let hexString = "#ff00ff00" + let color = UIColor(hexString) + + XCTAssertEqual(hexString, color?.hex) + } } diff --git a/HexColors-macOSTests/HexColors_macOSTests.swift b/HexColors-macOSTests/HexColors_macOSTests.swift index 0dc0644..0e22f67 100644 --- a/HexColors-macOSTests/HexColors_macOSTests.swift +++ b/HexColors-macOSTests/HexColors_macOSTests.swift @@ -10,135 +10,133 @@ import XCTest @testable import HexColors class HexColors_macOSTests: XCTestCase { - - func testCantCreateColorFromEmptyString() { - - XCTAssertNil(NSColor(hex: "")) - } - - func testCantCreateColorFromEmptyStringWithAlpha() { - - XCTAssertNil(NSColor(hex: "", alpha: 0.2)) - } - - func testCantCreateColorFromStringThatsNotHexConform() { - - XCTAssertNil(NSColor(hex: "Wow what a nice view!")) - } - - func testCantCreateColorFromStringThatsNotHexConformWithAlpha() { - - XCTAssertNil(NSColor(hex: "Wow what a nice view!", alpha: 0.2)) - } - - func testCantCreateColorFromStringWith3CharactersThatAreNotInHexRange() { - XCTAssertNil(NSColor(hex: "ZXY")) - } - - func testCantCreateColorFromStringWith3CharactersThatAreNotInHexRangeWithAlpha() { - XCTAssertNil(NSColor(hex: "ZXY", alpha: 0.2)) - } - - func testCantCreateColorFromStringWith4CharactersThatAreNotInHexRange() { - XCTAssertNil(NSColor(hex: "ZXYL")) - } - - func testCantCreateColorFromStringWith4CharactersThatAreNotInHexRangeWithAlpha() { - XCTAssertNil(NSColor(hex: "ZXYL", alpha: 0.2)) - } - - func testCantCreateColorFromStringWith6CharactersThatAreNotInHexRange() { - XCTAssertNil(NSColor(hex: "ZXYLPK")) - } - - func testCantCreateColorFromStringWith6CharactersThatAreNotInHexRangeWithAlpha() { - XCTAssertNil(NSColor(hex: "ZXYLPK", alpha: 0.2)) - } - - func testCantCreateColorFromStringWith8CharactersThatAreNotInHexRange() { - XCTAssertNil(NSColor(hex: "ZXYLPKXX")) - } - - func testCantCreateColorFromStringWith8CharactersThatAreNotInHexRangeWithAlpha() { - XCTAssertNil(NSColor(hex: "ZXYLPKXX", alpha: 0.2)) - } - - func testCanCreateColorFromValidHexStringWith3Characters() { - XCTAssertEqual(NSColor(hex: "FFF"), NSColor(calibratedRed: 1, green: 1, blue: 1, alpha: 1)) - } - - func testCanCreateColorFromValidHexStringWith3CharactersAndHashPrefix() { - XCTAssertEqual(NSColor(hex: "#FFF"), NSColor(calibratedRed: 1, green: 1, blue: 1, alpha: 1)) - } - - func testCanCreateColorFromValidHexStringWith3CharactersAndAlpha() { - XCTAssertEqual(NSColor(hex: "FFF", alpha: 0.2), NSColor(calibratedRed: 1, green: 1, blue: 1, alpha: 0.2)) - } - - func testCanCreateColorFromValidHexStringWith3CharactersAndAlphaAndHashPrefix() { - XCTAssertEqual(NSColor(hex: "#FFF", alpha: 0.2), NSColor(calibratedRed: 1, green: 1, blue: 1, alpha: 0.2)) - } - - func testCanCreateColorFromValidHexStringWith4Characters() { - XCTAssertEqual(NSColor(hex: "FFF0"), NSColor(calibratedRed: 1, green: 1, blue: 1, alpha: 0)) - } - - func testCanCreateColorFromValidHexStringWith4CharactersAndHashPrefix() { - XCTAssertEqual(NSColor(hex: "#FFF0"), NSColor(calibratedRed: 1, green: 1, blue: 1, alpha: 0)) - } - - func testCanCreateColorFromValidHexStringWith4CharactersAndAlpha() { - XCTAssertEqual(NSColor(hex: "FFFF", alpha: 0.2), NSColor(calibratedRed: 1, green: 1, blue: 1, alpha: 0.2)) - } - - func testCanCreateColorFromValidHexStringWith4CharactersAndAlphaAndHashPrefix() { - XCTAssertEqual(NSColor(hex: "#FFFF", alpha: 0.2), NSColor(calibratedRed: 1, green: 1, blue: 1, alpha: 0.2)) - } - - func testCanCreateColorFromValidHexStringWith6Characters() { - XCTAssertEqual(NSColor(hex: "FF00FF"), NSColor(calibratedRed: 1, green: 0, blue: 1, alpha: 1)) - } - - func testCanCreateColorFromValidHexStringWith6CharactersAndHashPrefix() { - XCTAssertEqual(NSColor(hex: "#FF00FF"), NSColor(calibratedRed: 1, green: 0, blue: 1, alpha: 1)) - } - - func testCanCreateColorFromValidHexStringWith6CharactersAndAlpha() { - XCTAssertEqual(NSColor(hex: "FF00FF", alpha: 0.2), NSColor(calibratedRed: 1, green: 0, blue: 1, alpha: 0.2)) - } - - func testCanCreateColorFromValidHexStringWith6CharactersAndAlphaAndHashPrefix() { - XCTAssertEqual(NSColor(hex: "#FF00FF", alpha: 0.2), NSColor(calibratedRed: 1, green: 0, blue: 1, alpha: 0.2)) - } - - func testCanCreateColorFromValidHexStringWith8Characters() { - XCTAssertEqual(NSColor(hex: "FF00FF00"), NSColor(calibratedRed: 1, green: 0, blue: 1, alpha: 0)) - } - - func testCanCreateColorFromValidHexStringWith8CharactersAndHashPrefix() { - XCTAssertEqual(NSColor(hex: "#FF00FF00"), NSColor(calibratedRed: 1, green: 0, blue: 1, alpha: 0)) - } - - func testCanCreateColorFromValidHexStringWith8CharactersAndAlpha() { - XCTAssertEqual(NSColor(hex: "FF00FFFF", alpha: 0.2), NSColor(calibratedRed: 1, green: 0, blue: 1, alpha: 0.2)) - } - - func testCanCreateColorFromValidHexStringWith8CharactersAndAlphaAndHashPrefix() { - XCTAssertEqual(NSColor(hex: "#FF00FFFF", alpha: 0.2), NSColor(calibratedRed: 1, green: 0, blue: 1, alpha: 0.2)) - } - - func testCanTransformToColorAndBackToHexString() { - let hexString = "#ff00ff" - let color = NSColor(hex: hexString) - - XCTAssertEqual(hexString, color?.hex) - } - - func testCanTransformToColorWithAlphaAndBackToHexString() { - let hexString = "#ff00ff00" - let color = NSColor(hex: hexString) - - XCTAssertEqual(hexString, color?.hex) - } - + + func testCantCreateColorFromEmptyString() { + XCTAssertNil(NSColor("")) + } + + func testCantCreateColorFromEmptyStringWithAlpha() { + XCTAssertNil(NSColor("", alpha: 0.2)) + } + + func testCantCreateColorFromStringThatsNotHexConform() { + + XCTAssertNil(NSColor("Wow what a nice view!")) + } + + func testCantCreateColorFromStringThatsNotHexConformWithAlpha() { + + XCTAssertNil(NSColor("Wow what a nice view!", alpha: 0.2)) + } + + func testCantCreateColorFromStringWith3CharactersThatAreNotInHexRange() { + XCTAssertNil(NSColor("ZXY")) + } + + func testCantCreateColorFromStringWith3CharactersThatAreNotInHexRangeWithAlpha() { + XCTAssertNil(NSColor("ZXY", alpha: 0.2)) + } + + func testCantCreateColorFromStringWith4CharactersThatAreNotInHexRange() { + XCTAssertNil(NSColor("ZXYL")) + } + + func testCantCreateColorFromStringWith4CharactersThatAreNotInHexRangeWithAlpha() { + XCTAssertNil(NSColor("ZXYL", alpha: 0.2)) + } + + func testCantCreateColorFromStringWith6CharactersThatAreNotInHexRange() { + XCTAssertNil(NSColor("ZXYLPK")) + } + + func testCantCreateColorFromStringWith6CharactersThatAreNotInHexRangeWithAlpha() { + XCTAssertNil(NSColor("ZXYLPK", alpha: 0.2)) + } + + func testCantCreateColorFromStringWith8CharactersThatAreNotInHexRange() { + XCTAssertNil(NSColor("ZXYLPKXX")) + } + + func testCantCreateColorFromStringWith8CharactersThatAreNotInHexRangeWithAlpha() { + XCTAssertNil(NSColor("ZXYLPKXX", alpha: 0.2)) + } + + func testCanCreateColorFromValidHexStringWith3Characters() { + XCTAssertEqual(NSColor("FFF"), NSColor(calibratedRed: 1, green: 1, blue: 1, alpha: 1)) + } + + func testCanCreateColorFromValidHexStringWith3CharactersAndHashPrefix() { + XCTAssertEqual(NSColor("#FFF"), NSColor(calibratedRed: 1, green: 1, blue: 1, alpha: 1)) + } + + func testCanCreateColorFromValidHexStringWith3CharactersAndAlpha() { + XCTAssertEqual(NSColor("FFF", alpha: 0.2), NSColor(calibratedRed: 1, green: 1, blue: 1, alpha: 0.2)) + } + + func testCanCreateColorFromValidHexStringWith3CharactersAndAlphaAndHashPrefix() { + XCTAssertEqual(NSColor("#FFF", alpha: 0.2), NSColor(calibratedRed: 1, green: 1, blue: 1, alpha: 0.2)) + } + + func testCanCreateColorFromValidHexStringWith4Characters() { + XCTAssertEqual(NSColor("FFF0"), NSColor(calibratedRed: 1, green: 1, blue: 1, alpha: 0)) + } + + func testCanCreateColorFromValidHexStringWith4CharactersAndHashPrefix() { + XCTAssertEqual(NSColor("#FFF0"), NSColor(calibratedRed: 1, green: 1, blue: 1, alpha: 0)) + } + + func testCanCreateColorFromValidHexStringWith4CharactersAndAlpha() { + XCTAssertEqual(NSColor("FFFF", alpha: 0.2), NSColor(calibratedRed: 1, green: 1, blue: 1, alpha: 0.2)) + } + + func testCanCreateColorFromValidHexStringWith4CharactersAndAlphaAndHashPrefix() { + XCTAssertEqual(NSColor("#FFFF", alpha: 0.2), NSColor(calibratedRed: 1, green: 1, blue: 1, alpha: 0.2)) + } + + func testCanCreateColorFromValidHexStringWith6Characters() { + XCTAssertEqual(NSColor("FF00FF"), NSColor(calibratedRed: 1, green: 0, blue: 1, alpha: 1)) + } + + func testCanCreateColorFromValidHexStringWith6CharactersAndHashPrefix() { + XCTAssertEqual(NSColor("#FF00FF"), NSColor(calibratedRed: 1, green: 0, blue: 1, alpha: 1)) + } + + func testCanCreateColorFromValidHexStringWith6CharactersAndAlpha() { + XCTAssertEqual(NSColor("FF00FF", alpha: 0.2), NSColor(calibratedRed: 1, green: 0, blue: 1, alpha: 0.2)) + } + + func testCanCreateColorFromValidHexStringWith6CharactersAndAlphaAndHashPrefix() { + XCTAssertEqual(NSColor("#FF00FF", alpha: 0.2), NSColor(calibratedRed: 1, green: 0, blue: 1, alpha: 0.2)) + } + + func testCanCreateColorFromValidHexStringWith8Characters() { + XCTAssertEqual(NSColor("FF00FF00"), NSColor(calibratedRed: 1, green: 0, blue: 1, alpha: 0)) + } + + func testCanCreateColorFromValidHexStringWith8CharactersAndHashPrefix() { + XCTAssertEqual(NSColor("#FF00FF00"), NSColor(calibratedRed: 1, green: 0, blue: 1, alpha: 0)) + } + + func testCanCreateColorFromValidHexStringWith8CharactersAndAlpha() { + XCTAssertEqual(NSColor("FF00FFFF", alpha: 0.2), NSColor(calibratedRed: 1, green: 0, blue: 1, alpha: 0.2)) + } + + func testCanCreateColorFromValidHexStringWith8CharactersAndAlphaAndHashPrefix() { + XCTAssertEqual(NSColor("#FF00FFFF", alpha: 0.2), NSColor(calibratedRed: 1, green: 0, blue: 1, alpha: 0.2)) + } + + func testCanTransformToColorAndBackToHexString() { + let hexString = "#ff00ff" + let color = NSColor(hexString) + + XCTAssertEqual(hexString, color?.hex) + } + + func testCanTransformToColorWithAlphaAndBackToHexString() { + let hexString = "#ff00ff00" + let color = NSColor(hexString) + + XCTAssertEqual(hexString, color?.hex) + } + } diff --git a/HexColors.xcodeproj/xcshareddata/xcschemes/HexColors-iOS-Tests.xcscheme b/HexColors.xcodeproj/xcshareddata/xcschemes/HexColors-iOS-Tests.xcscheme index 1a2531a..f16a2f9 100644 --- a/HexColors.xcodeproj/xcshareddata/xcschemes/HexColors-iOS-Tests.xcscheme +++ b/HexColors.xcodeproj/xcshareddata/xcschemes/HexColors-iOS-Tests.xcscheme @@ -5,6 +5,22 @@ + + + + + + + + + + @@ -37,6 +62,15 @@ debugDocumentVersioning = "YES" debugServiceExtension = "internal" allowLocationSimulation = "YES"> + + + + @@ -46,6 +80,15 @@ savedToolIdentifier = "" useCustomWorkingDirectory = "NO" debugDocumentVersioning = "YES"> + + + + diff --git a/HexColors.xcodeproj/xcshareddata/xcschemes/HexColors-macOS-Tests.xcscheme b/HexColors.xcodeproj/xcshareddata/xcschemes/HexColors-macOS-Tests.xcscheme index 757d7b0..569fc71 100644 --- a/HexColors.xcodeproj/xcshareddata/xcschemes/HexColors-macOS-Tests.xcscheme +++ b/HexColors.xcodeproj/xcshareddata/xcschemes/HexColors-macOS-Tests.xcscheme @@ -3,8 +3,24 @@ LastUpgradeVersion = "0820" version = "1.3"> + + + + + + + + + + @@ -37,6 +62,15 @@ debugDocumentVersioning = "YES" debugServiceExtension = "internal" allowLocationSimulation = "YES"> + + + + @@ -46,6 +80,15 @@ savedToolIdentifier = "" useCustomWorkingDirectory = "NO" debugDocumentVersioning = "YES"> + + + + diff --git a/Sources/HexColors.swift b/Sources/HexColors.swift index 55e5967..842e841 100644 --- a/Sources/HexColors.swift +++ b/Sources/HexColors.swift @@ -13,139 +13,137 @@ // #if os(iOS) || os(watchOS) || os(tvOS) - import UIKit - public typealias HexColor = UIColor + import UIKit + public typealias HexColor = UIColor #else - import Cocoa - public typealias HexColor = NSColor + import Cocoa + public typealias HexColor = NSColor #endif public extension HexColor { - typealias Hex = String + typealias Hex = String + + convenience init?(_ hex: Hex, alpha: CGFloat? = nil) { - convenience init?(_ hex: Hex, with alpha: CGFloat? = nil) { - - guard - let hexType = Type(from: hex), - let components = hexType.components() else { - return nil - } - - #if os(iOS) || os(watchOS) || os(tvOS) - self.init(red: components.red, green: components.green, blue: components.blue, alpha: alpha ?? components.alpha) - #else - self.init(calibratedRed: components.red, green: components.green, blue: components.blue, alpha: alpha ?? components.alpha) - #endif + guard let hexType = Type(from: hex), let components = hexType.components() else { + return nil } - /// The string hex value representation of the current color - var hex: Hex { - var r: CGFloat = 0, g: CGFloat = 0, b: CGFloat = 0, a: CGFloat = 0, rgb: Int - getRed(&r, green: &g, blue: &b, alpha: &a) - - if a == 1 { // no alpha value set, we are returning the short version - rgb = (Int)(r*255)<<16 | (Int)(g*255)<<8 | (Int)(r*255)<<0 - } else { - rgb = (Int)(r*255)<<24 | (Int)(g*255)<<16 | (Int)(r*255)<<8 | (Int)(a*255)<<0 - } - - return String(format: "#%06x", rgb) + #if os(iOS) || os(watchOS) || os(tvOS) + self.init(red: components.red, green: components.green, blue: components.blue, alpha: alpha ?? components.alpha) + #else + self.init(calibratedRed: components.red, green: components.green, blue: components.blue, alpha: alpha ?? components.alpha) + #endif + } + + /// The string hex value representation of the current color + var hex: Hex { + var r: CGFloat = 0, g: CGFloat = 0, b: CGFloat = 0, a: CGFloat = 0, rgb: Int + getRed(&r, green: &g, blue: &b, alpha: &a) + + if a == 1 { // no alpha value set, we are returning the short version + rgb = (Int)(r*255)<<16 | (Int)(g*255)<<8 | (Int)(r*255)<<0 + } else { + rgb = (Int)(r*255)<<24 | (Int)(g*255)<<16 | (Int)(r*255)<<8 | (Int)(a*255)<<0 + } + + return String(format: "#%06x", rgb) + } + + private enum `Type` { + + case RGBshort(rgb: Hex) + case RGBshortAlpha(rgba: Hex) + case RGB(rgb: Hex) + case RGBA(rgba: Hex) + + init?(from hex: Hex) { + + var hexString = hex + hexString.removeHashIfNecessary() + + guard let t = Type.transform(hex: hexString) else { + return nil + } + + self = t } - private enum `Type` { - - case RGBshort(rgb: Hex) - case RGBshortAlpha(rgba: Hex) - case RGB(rgb: Hex) - case RGBA(rgba: Hex) - - init?(from hex: Hex) { - - var hexString = hex - hexString.removeHashIfNecessary() - - guard let t = Type.transform(hex: hexString) else { - return nil - } - - self = t - } - - static func transform(hex string: Hex) -> Type? { - switch string.characters.count { - case 3: - return .RGBshort(rgb: string) - case 4: - return .RGBshortAlpha(rgba: string) - case 6: - return .RGB(rgb: string) - case 8: - return .RGBA(rgba: string) - default: - return nil - } - } - - var value: Hex { - switch self { - case .RGBshort(let rgb): - return rgb - case .RGBshortAlpha(let rgba): - return rgba - case .RGB(let rgb): - return rgb - case .RGBA(let rgba): - return rgba - } - } - - typealias rgbComponents = (red: CGFloat, green: CGFloat, blue: CGFloat, alpha: CGFloat) - func components() -> rgbComponents? { - - var hexValue: UInt32 = 0 - guard Scanner(string: value).scanHexInt32(&hexValue) else { - return nil - } - - let r, g, b, a, divisor: CGFloat - - switch self { - case .RGBshort(_): - divisor = 15 - r = CGFloat((hexValue & 0xF00) >> 8) / divisor - g = CGFloat((hexValue & 0x0F0) >> 4) / divisor - b = CGFloat( hexValue & 0x00F) / divisor - a = 1 - case .RGBshortAlpha(_): - divisor = 15 - r = CGFloat((hexValue & 0xF000) >> 12) / divisor - g = CGFloat((hexValue & 0x0F00) >> 8) / divisor - b = CGFloat((hexValue & 0x00F0) >> 4) / divisor - a = CGFloat( hexValue & 0x000F) / divisor - case .RGB(_): - divisor = 255 - r = CGFloat((hexValue & 0xFF0000) >> 16) / divisor - g = CGFloat((hexValue & 0x00FF00) >> 8) / divisor - b = CGFloat( hexValue & 0x0000FF) / divisor - a = 1 - case .RGBA(_): - divisor = 255 - r = CGFloat((hexValue & 0xFF000000) >> 24) / divisor - g = CGFloat((hexValue & 0x00FF0000) >> 16) / divisor - b = CGFloat((hexValue & 0x0000FF00) >> 8) / divisor - a = CGFloat( hexValue & 0x000000FF) / divisor - } - - return (red: r, green: g, blue: b, alpha: a) - } + static func transform(hex string: Hex) -> Type? { + switch string.characters.count { + case 3: + return .RGBshort(rgb: string) + case 4: + return .RGBshortAlpha(rgba: string) + case 6: + return .RGB(rgb: string) + case 8: + return .RGBA(rgba: string) + default: + return nil + } } + + var value: Hex { + switch self { + case .RGBshort(let rgb): + return rgb + case .RGBshortAlpha(let rgba): + return rgba + case .RGB(let rgb): + return rgb + case .RGBA(let rgba): + return rgba + } + } + + typealias rgbComponents = (red: CGFloat, green: CGFloat, blue: CGFloat, alpha: CGFloat) + func components() -> rgbComponents? { + + var hexValue: UInt32 = 0 + guard Scanner(string: value).scanHexInt32(&hexValue) else { + return nil + } + + let r, g, b, a, divisor: CGFloat + + switch self { + case .RGBshort(_): + divisor = 15 + r = CGFloat((hexValue & 0xF00) >> 8) / divisor + g = CGFloat((hexValue & 0x0F0) >> 4) / divisor + b = CGFloat( hexValue & 0x00F) / divisor + a = 1 + case .RGBshortAlpha(_): + divisor = 15 + r = CGFloat((hexValue & 0xF000) >> 12) / divisor + g = CGFloat((hexValue & 0x0F00) >> 8) / divisor + b = CGFloat((hexValue & 0x00F0) >> 4) / divisor + a = CGFloat( hexValue & 0x000F) / divisor + case .RGB(_): + divisor = 255 + r = CGFloat((hexValue & 0xFF0000) >> 16) / divisor + g = CGFloat((hexValue & 0x00FF00) >> 8) / divisor + b = CGFloat( hexValue & 0x0000FF) / divisor + a = 1 + case .RGBA(_): + divisor = 255 + r = CGFloat((hexValue & 0xFF000000) >> 24) / divisor + g = CGFloat((hexValue & 0x00FF0000) >> 16) / divisor + b = CGFloat((hexValue & 0x0000FF00) >> 8) / divisor + a = CGFloat( hexValue & 0x000000FF) / divisor + } + + return (red: r, green: g, blue: b, alpha: a) + } + } } private extension String { - - mutating func removeHashIfNecessary() { - if hasPrefix("#") { - self = replacingOccurrences(of: "#", with: "") - } + + mutating func removeHashIfNecessary() { + if hasPrefix("#") { + self = replacingOccurrences(of: "#", with: "") } + } } From 3b9c23f1deff001f8f89bca83b1b03b7aa3d4928 Mon Sep 17 00:00:00 2001 From: Marius Landwehr Date: Sun, 8 Jan 2017 12:15:29 +0100 Subject: [PATCH 28/31] Updated the Readme.md --- README.md | 104 +++++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 79 insertions(+), 25 deletions(-) diff --git a/README.md b/README.md index 0767e2b..f22e4f1 100644 --- a/README.md +++ b/README.md @@ -7,49 +7,103 @@ ![Badge w/ Version](https://travis-ci.org/mRs-/HexColors.svg) [![codecov](https://codecov.io/gh/mRs-/HexColors/branch/master/graph/badge.svg)](https://codecov.io/gh/mRs-/HexColors) -HexColors is an extension for UIColor and NSColor to support for creating colors from a hex string like #FF0088 or 8844FF. Completely rewritten in Swift 3! +HexColors is an extension for UIColor and NSColor to support for creating colors from a hex string like #FF0088 or 8844FF and back to a String. Completely rewritten in Swift 3! If you want to use this in Objective-C jump to the 3.X version Tag. #RELEASE 5.0.0 Completely new and fresh in Swift 3. -#Example iOS +#Examples +How to use HexColors in the different systems. + +##iOS / watchOS / tvOS + +### Generating UIColors + +``` swift +let colorWithHex = UIColor("#ff8942") +let colorWithoutHex = UIColor("ff8942") +let colorWithHexAndAlhpa = UIColor("#ff8942DF") +let colorWithoutHexAndAlhpa = UIColor("ff8942DF") +let shortColorWithHex = UIColor("#fff") +let shortColorWithoutHex = UIColor("fff") +let shortColorWithHexAndAlpha = UIColor("#FFFD") +let shortColorWithoutHexAndAlpha = UIColor("#FFFD") +``` + +### Generating Hex Strings from UIColor ``` swift -let colorWithHex = UIColor(hex: "#ff8942") -let colorWithoutHex = UIColor(hex: "ff8942") -let colorWithHexAndAlhpa = UIColor(hex: "#ff8942DF") -let colorWithoutHexAndAlhpa = UIColor(hex: "ff8942DF") -let shortColorWithHex = UIColor(hex: "#fff") -let shortColorWithoutHex = UIColor(hex: "fff") -let shortColorWithHexAndAlpha = UIColor(hex: "#FFFD") -let shortColorWithoutHexAndAlpha = UIColor(hex: "#FFFD") +let colorWithHex = UIColor("#ff8942") +let stringFromColor = colorWithHex.hex ``` -#Example macOS +##macOS + +### Generating NSColor +``` swift +let colorWithHex = NSColor("#ff8942") +let colorWithoutHex = NSColor("ff8942") +let colorWithHexAndAlhpa = NSColor("#ff8942DF") +let colorWithoutHexAndAlhpa = NSColor("ff8942DF") +let shortColorWithHex = NSColor("#fff") +let shortColorWithoutHex = NSColor("fff") +let shortColorWithHexAndAlpha = NSColor("#FFFD") +let shortColorWithoutHexAndAlpha = NSColor("#FFFD") +``` + +### Generating Hex Strings from NSColor ``` swift -let colorWithHex = NSColor(hex: "#ff8942") -let colorWithoutHex = NSColor(hex: "ff8942") -let colorWithHexAndAlhpa = NSColor(hex: "#ff8942DF") -let colorWithoutHexAndAlhpa = NSColor(hex: "ff8942DF") -let shortColorWithHex = NSColor(hex: "#fff") -let shortColorWithoutHex = NSColor(hex: "fff") -let shortColorWithHexAndAlpha = NSColor(hex: "#FFFD") -let shortColorWithoutHexAndAlpha = NSColor(hex: "#FFFD") +let colorWithHex = NSColor("#ff8942") +let stringFromColor = colorWithHex.hex ``` #Installation -* `pod install HexColors` -* or just drag the source files in your project ##Requirements HexColors requires **>= iOS 8.0** and **>=macOS 10.9**. -##Credits -HexColors was created by [Marius Landwehr](https://github.com/mRs-) because of the pain recalculating Hex values to RGB. +## Cocoapods +Add HexColors to your Podfile: +``` ruby +pod 'HexColors' +``` +* `pod install HexColors` + +## Carthage +Add HexColors to your Cartfile: +``` +github "mRs-/HexColors" +``` + +## Swift Package Manager +To work with the Swift Package Manager you need to add a Package.swift file and defining your package. + +``` swift +import PackageDescription + +let package = Package( + name: "YourPackageName", + dependencies: [ + .Package(url: "htthttps://github.com/mRs-/HexColors", majorVersion: 5), + ] +) +``` + +Then execute the Swift Package Manager with the following Shell commands: +``` bash +swift build +.build/debug/YourPackageName +``` + +## Manual +Simply just drag and drop the HexColors.swift in your project. + +#Credits +HexColors was created by [Marius Landwehr](https://github.com/mRs-) because of the pain to create Colors from a API (mostly hex) converting to a UI/NSColor. -##Creator +#Creator [Marius Landwehr](https://github.com/mRs-) [@mariusLAN](https://twitter.com/mariusLAN) -##License +#License HexColors is available under the MIT license. See the LICENSE file for more info. From 22c8cad06891082e81325fd5dd6ca70e58c4ba2f Mon Sep 17 00:00:00 2001 From: Marius Landwehr Date: Sun, 8 Jan 2017 12:33:32 +0100 Subject: [PATCH 29/31] Added badges --- README.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index f22e4f1..2577530 100644 --- a/README.md +++ b/README.md @@ -2,9 +2,12 @@ HexColors

========================= -![Badge w/ Version](https://cocoapod-badges.herokuapp.com/v/HexColors/badge.png) -![Badge w/ Version](https://cocoapod-badges.herokuapp.com/p/HexColors/badge.png) -![Badge w/ Version](https://travis-ci.org/mRs-/HexColors.svg) +[![Platform](https://img.shields.io/badge/platform-iOS%20%7C%20watchOS%20%7C%20tvOS%20%7C%20macOS-lightgrey.svg)](https://github.com/mrs-/HexColors) +[![Xcode](https://img.shields.io/badge/Xcode-8.0-blue.svg)](https://developer.apple.com/xcode) +[![Swift](https://img.shields.io/badge/Swift-3.0-orange.svg)](https://swift.org) +[![Downloads Month](https://img.shields.io/cocoapods/dm/HexColors.svg)] +![Cocoapods](https://cocoapod-badges.herokuapp.com/v/HexColors/badge.png) +[![Build Status](https://travis-ci.org/mRs-/HexColors.svg?branch=master)](https://travis-ci.org/mrs-/HexColors) [![codecov](https://codecov.io/gh/mRs-/HexColors/branch/master/graph/badge.svg)](https://codecov.io/gh/mRs-/HexColors) HexColors is an extension for UIColor and NSColor to support for creating colors from a hex string like #FF0088 or 8844FF and back to a String. Completely rewritten in Swift 3! From 4629f63dc987d74ed214fee52e42e216d4619e36 Mon Sep 17 00:00:00 2001 From: Marius Landwehr Date: Sun, 8 Jan 2017 12:34:29 +0100 Subject: [PATCH 30/31] Fixed Typo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2577530..b23477d 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ [![Platform](https://img.shields.io/badge/platform-iOS%20%7C%20watchOS%20%7C%20tvOS%20%7C%20macOS-lightgrey.svg)](https://github.com/mrs-/HexColors) [![Xcode](https://img.shields.io/badge/Xcode-8.0-blue.svg)](https://developer.apple.com/xcode) [![Swift](https://img.shields.io/badge/Swift-3.0-orange.svg)](https://swift.org) -[![Downloads Month](https://img.shields.io/cocoapods/dm/HexColors.svg)] +![Downloads Month](https://img.shields.io/cocoapods/dm/HexColors.svg) ![Cocoapods](https://cocoapod-badges.herokuapp.com/v/HexColors/badge.png) [![Build Status](https://travis-ci.org/mRs-/HexColors.svg?branch=master)](https://travis-ci.org/mrs-/HexColors) [![codecov](https://codecov.io/gh/mRs-/HexColors/branch/master/graph/badge.svg)](https://codecov.io/gh/mRs-/HexColors) From e5e748396baaaebb70265d008ee4c1199504ca8a Mon Sep 17 00:00:00 2001 From: Marius Landwehr Date: Sun, 8 Jan 2017 12:41:43 +0100 Subject: [PATCH 31/31] Added Version for Changelog - changed podspec file to use the new version --- CHANGELOG.md | 9 ++++++++- HexColors.podspec | 22 ++++++++++++---------- README.md | 2 +- 3 files changed, 21 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 71fe16e..f035f64 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,9 +3,16 @@ All notable changes to this project will be documented in this file. `HexColors` adheres to [Semantic Versioning](http://semver.org/). --- +## [5.0.0] (https://github.com/mRs-/HexColors/tree/5.0.0) +* Completetly rewritten in Swift 3.0 +* hx_colorWithHexString / hx_colorWithHexRGBAString are not working any more +* breaking API-Changes +* Create UI/NSColor now with `UIColor("#FF00FF")` or `NSColor("#00FFFF")` +* For Objective-C support switch to Version [4.0.0] (https://github.com/mRs-/HexColors/tree/5.0.0) + ## [4.0.0] (https://github.com/mRs-/HexColors/tree/4.0.0) * depricating hx_colorWithHexString use hx_colorWithHexRGBAString instead -** we moved from hx_colorWithHexString to show you where we are heading in the future. Most of you are not using the alpha component of this so we are moving this to colorWithHexRGBA, because most browsers are doing the same here. It's just natural to follow this through the library. We will drop this in colorWithHexString in 5.0.0 +** we moved from hx_colorWithHexString to show you where we are heading in the future. Most of you are not using the alpha component of this so we are moving this to colorWithHexRGBA, because most browsers are doing the same here. It's just natural to follow this through the library. ## [3.1.1] (https://github.com/mRs-/HexColors/tree/3.1.1) * added cocoadocs diff --git a/HexColors.podspec b/HexColors.podspec index 81c3519..fdfde33 100644 --- a/HexColors.podspec +++ b/HexColors.podspec @@ -1,17 +1,19 @@ Pod::Spec.new do |s| - s.name = 'HexColors' - s.version = '4.0.0' - s.license = 'MIT' - s.summary = 'Easy HEX- and RGB-Color Handling for UIColor and NSColor as a drop in category. Former MLUIColorAdditions.' + s.name = 'HexColors' + s.version = '5.0.0' + s.license = 'MIT' + s.summary = 'HexColors is an extension for UIColor and NSColor to support for creating colors from a hex strings.' s.homepage = 'https://github.com/mRs-/HexColors' s.description = %{ - HexColors is easy drop in category for HexColor integration in iOS and Mac OS X. Its build as a category for easy to use and can be used for UIColor and NSColor class. + HexColors is an extension for UIColor and NSColor to support for creating colors from a hex string like #FF0088 or 8844FF and back to a String. Completely rewritten in Swift 3! + + If you want to use this in Objective-C jump to the 4.X version Tag. } - s.author = { "Marius Landwehr" => "marius.landwehr@gmail.com", "holgersindbaek" => "holgersindbaek@gmail.com" } - s.source = { :git => 'https://github.com/mRs-/HexColors.git', :tag => s.version.to_s} - s.ios.deployment_target = '5.0' - s.osx.deployment_target = '10.6' + s.author = { "Marius Landwehr" => "marius.landwehr@gmail.com" } + s.source = { :git => 'https://github.com/mRs-/HexColors.git', :tag => s.version.to_s} + s.ios.deployment_target = '8.0' + s.osx.deployment_target = '10.9' s.watchos.deployment_target = '2.0' s.tvos.deployment_target = '9.0' - s.source_files = 'Classes/HexColors.{h,m}' + s.source_files = 'Sources/*.swift' end diff --git a/README.md b/README.md index b23477d..b1ab5a2 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ HexColors is an extension for UIColor and NSColor to support for creating colors from a hex string like #FF0088 or 8844FF and back to a String. Completely rewritten in Swift 3! -If you want to use this in Objective-C jump to the 3.X version Tag. +If you want to use this in Objective-C jump to the 4.X version tag. #RELEASE 5.0.0 Completely new and fresh in Swift 3.