Skip to content

Commit

Permalink
Update UIColor_Hex_Swift.podspec
Browse files Browse the repository at this point in the history
  • Loading branch information
yeahdongcn committed Sep 21, 2016
1 parent 7304dff commit b7867c2
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions HEXColor/UIColorExtension.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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:
Expand All @@ -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)
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 = "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' }
Expand Down

0 comments on commit b7867c2

Please sign in to comment.