From 95dcfef61f88c5d710a729a037e7861ef42eba59 Mon Sep 17 00:00:00 2001 From: onevcat Date: Tue, 29 Aug 2017 12:47:04 +0900 Subject: [PATCH] macOS compatible --- Sources/Kingfisher.swift | 2 ++ Sources/Placeholder.swift | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Sources/Kingfisher.swift b/Sources/Kingfisher.swift index 6e2d40998..ec88e5a6e 100644 --- a/Sources/Kingfisher.swift +++ b/Sources/Kingfisher.swift @@ -30,12 +30,14 @@ import ImageIO #if os(macOS) import AppKit public typealias Image = NSImage + public typealias View = NSView public typealias Color = NSColor public typealias ImageView = NSImageView typealias Button = NSButton #else import UIKit public typealias Image = UIImage + public typealias View = UIView public typealias Color = UIColor #if !os(watchOS) public typealias ImageView = UIImageView diff --git a/Sources/Placeholder.swift b/Sources/Placeholder.swift index 69bcca2ba..9d052805e 100755 --- a/Sources/Placeholder.swift +++ b/Sources/Placeholder.swift @@ -42,7 +42,7 @@ extension Placeholder where Self: Image { extension Image: Placeholder {} -extension Placeholder where Self: UIView { +extension Placeholder where Self: View { public func add(to imageView: ImageView) { imageView.addSubview(self)