Skip to content

Commit

Permalink
Update to Swift 4.2 and update podspec version to 4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
yeahdongcn committed Sep 14, 2018
1 parent 394a0d4 commit d659252
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 5 deletions.
4 changes: 2 additions & 2 deletions HEXColor.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@
SKIP_INSTALL = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
};
name = Debug;
};
Expand All @@ -509,7 +509,7 @@
PRODUCT_NAME = HEXColor;
SKIP_INSTALL = YES;
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
};
name = Release;
};
Expand Down
16 changes: 16 additions & 0 deletions HEXColorTests/HEXColorTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,22 @@ class HEXColorTests: XCTestCase {
}
}
}

// MARK: - Hex string output for red/green/blue color
func testXX() {
do {
let redString = try UIColor.red.hexStringThrows(true)
XCTAssertEqual(redString, UIColor.red.hexString(true))

let greenString = try UIColor.green.hexStringThrows(false)
XCTAssertEqual(greenString, UIColor.green.hexString(false))

let blueString = try UIColor.blue.hexStringThrows()
XCTAssertEqual(blueString, UIColor.blue.hexString())
} catch {
XCTAssertTrue(false)
}
}
}

extension UIColor {
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Simply add the following lines to your `Podfile`:
# required by CocoaPods 0.36.0.rc.1 for Swift Pods
use_frameworks!

pod 'UIColor_Hex_Swift', '~> 4.0.2'
pod 'UIColor_Hex_Swift', '~> 4.2.0'
```

Then import it where you use it:
Expand All @@ -58,7 +58,7 @@ import UIColor_Hex_Swift
Simply add the following line to your `Cartfile`:

```ruby
github "yeahdongcn/UIColor-Hex-Swift" >= 4.0.2
github "yeahdongcn/UIColor-Hex-Swift" >= 4.2.0
```

Then add the HexColor.framework to your frameworks list in the Xcode project.
Expand Down
2 changes: 1 addition & 1 deletion UIColor_Hex_Swift.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "UIColor_Hex_Swift"
s.version = "4.0.2"
s.version = "4.2.0"
s.summary = "Convenience method for creating autoreleased color using RGBA hex string."
s.homepage = "https://github.com/yeahdongcn/UIColor-Hex-Swift"
s.license = { :type => 'MIT', :file => 'LICENSE' }
Expand Down

0 comments on commit d659252

Please sign in to comment.