From b7867c2fc0e7c89419be6bb8ce32b128af92f93b Mon Sep 17 00:00:00 2001 From: R0CKSTAR Date: Wed, 21 Sep 2016 16:09:17 +0800 Subject: [PATCH] Update UIColor_Hex_Swift.podspec --- HEXColor/UIColorExtension.swift | 4 ++-- README.md | 10 +++++----- UIColor_Hex_Swift.podspec | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/HEXColor/UIColorExtension.swift b/HEXColor/UIColorExtension.swift index 2eddff5..f674678 100644 --- a/HEXColor/UIColorExtension.swift +++ b/HEXColor/UIColorExtension.swift @@ -124,9 +124,9 @@ extension UIColor { /** Hex string of a UIColor instance. - - parameter rgba: Whether the alpha should be included. + - parameter includeAlpha: Whether the alpha should be included. */ - public func hexString(_ includeAlpha: Bool) -> String { + public func hexString(_ includeAlpha: Bool = true) -> String { var r: CGFloat = 0 var g: CGFloat = 0 var b: CGFloat = 0 diff --git a/README.md b/README.md index 1085467..bc28af1 100644 --- a/README.md +++ b/README.md @@ -7,15 +7,15 @@ UIColor+Hex, now Swift. ================= Convenience method for creating autoreleased color using RGBA hex string. - var strokeColor = UIColor("#ffcc00").CGColor // Solid color + var strokeColor = UIColor("#FFCC00").CGColor // Solid color - var fillColor = UIColor("#ffcc00dd").CGColor // Color with alpha + var fillColor = UIColor("#FFCC00DD").CGColor // Color with alpha var backgroundColor = UIColor("#FFF") // Supports shorthand 3 character representation var menuTextColor = UIColor("#013E") // Supports shorthand 4 character representation (with alpha) - var hexString = UIColor.redColor().hexString(false) // "#FF0000" + var hexString = UIColor.redColor().hexString() // "#FF0000FF" ##Installation @@ -26,7 +26,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', '~> 3.0' +pod 'UIColor_Hex_Swift', '~> 3.0.1' ``` Then import it where you use it: @@ -41,7 +41,7 @@ import UIColor_Hex_Swift Simply add the following line to your `Cartfile`: ```ruby -github "yeahdongcn/UIColor-Hex-Swift" >= 3.0 +github "yeahdongcn/UIColor-Hex-Swift" >= 3.0.1 ``` ================= See more in [RSBarcodes_Swift](https://github.com/yeahdongcn/RSBarcodes_Swift) and [objc version](https://github.com/yeahdongcn/RSBarcodes) diff --git a/UIColor_Hex_Swift.podspec b/UIColor_Hex_Swift.podspec index b5cebc4..7f7e2b2 100644 --- a/UIColor_Hex_Swift.podspec +++ b/UIColor_Hex_Swift.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "UIColor_Hex_Swift" - s.version = "3.0" + s.version = "3.0.1" 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' }