Skip to content

Commit

Permalink
0.10.0
Browse files Browse the repository at this point in the history
  • Loading branch information
EyreFree committed Oct 6, 2019
1 parent 5a5b5e0 commit 8a5e437
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 18 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

-----

## [0.10.0](https://github.com/EFPrefix/EFFoundation/releases/tag/0.10.0) (2019-10-06)

- `var` changed to `func` in `CGColor`, `CIColor` and `NSColor`.

---

## [0.9.5](https://github.com/EFPrefix/EFFoundation/releases/tag/0.9.5) (2019-10-06)

- Add extension for `NSColor` and `NSImage`.
Expand Down
2 changes: 1 addition & 1 deletion EFFoundation.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'EFFoundation'
s.version = '0.9.5'
s.version = '0.10.0'
s.summary = 'EFFoundation.'

s.description = <<-DESC
Expand Down
4 changes: 2 additions & 2 deletions EFFoundation/Core/CGColor+.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ import UIKit
public extension CGColor {

#if canImport(CoreImage)
var ciColor: CIColor {
func ciColor() -> CIColor {
return CIColor(cgColor: self)
}
#endif

#if canImport(UIKit)
var uiColor: UIColor {
func uiColor() -> UIColor {
return UIColor(cgColor: self)
}
#endif
Expand Down
14 changes: 9 additions & 5 deletions EFFoundation/Core/CIColor+.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,18 @@ import UIKit

public extension CIColor {

var cgColor: CGColor? {
return CGColor(colorSpace: colorSpace, components: components)
}

#if canImport(UIKit)
var uiColor: UIColor {
func uiColor() -> UIColor {
return UIColor(ciColor: self)
}

func cgColor() -> CGColor {
return CGColor(colorSpace: colorSpace, components: components) ?? uiColor().cgColor()
}
#else
func cgColor() -> CGColor? {
return CGColor(colorSpace: colorSpace, components: components)
}
#endif
}
#endif
6 changes: 3 additions & 3 deletions EFFoundation/Core/NSColor+.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ import AppKit

public extension NSColor {

var ciColor: CIColor {
return cgColor.ciColor
func ciColor() -> CIColor {
return cgColor().ciColor()
}

var cgColor: CGColor {
func cgColor() -> CGColor {
return cgColor
}
}
Expand Down
3 changes: 2 additions & 1 deletion EFFoundation/Core/NSImage+.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

#if canImport(AppKit)
import AppKit
import CoreImage

public extension NSImage {

Expand All @@ -15,7 +16,7 @@ public extension NSImage {
}

func cgImage() -> CGImage? {
return ciImage()?.cgImage()
return cgImage(forProposedRect: nil, context: nil, hints: nil) ?? ciImage()?.cgImage()
}
}
#endif
12 changes: 6 additions & 6 deletions Example/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
PODS:
- DeviceKit (2.2.0)
- EFFoundation/Attributes (0.9.5):
- EFFoundation/Attributes (0.10.0):
- EFFoundation/Core
- SwiftyAttributes (>= 5.1.1)
- EFFoundation/Complete (0.9.5):
- EFFoundation/Complete (0.10.0):
- EFFoundation/Attributes
- EFFoundation/Core
- EFFoundation/Device
- EFFoundation/Reachability
- EFFoundation/Core (0.9.5)
- EFFoundation/Device (0.9.5):
- EFFoundation/Core (0.10.0)
- EFFoundation/Device (0.10.0):
- DeviceKit (>= 2.2.0)
- EFFoundation/Core
- EFFoundation/Reachability (0.9.5):
- EFFoundation/Reachability (0.10.0):
- EFFoundation/Core
- ReachabilitySwift (>= 4.3.1)
- ReachabilitySwift (4.3.1)
Expand All @@ -34,7 +34,7 @@ EXTERNAL SOURCES:

SPEC CHECKSUMS:
DeviceKit: ee5d2ec3bc8ad3847f9f0f202de0be09448707e1
EFFoundation: 147d8ddd02f3376fde550497483f0950bca0b9b9
EFFoundation: e92f2cc755c209305563199b4f8590eb006f1715
ReachabilitySwift: 4032e2f59586e11e3b0ebe15b167abdd587a388b
SwiftyAttributes: e3e13891ddac3c62b3d7798d5c3969cea88e62bb

Expand Down

0 comments on commit 8a5e437

Please sign in to comment.