From fd2a965a894ca79e3bf418bb72c7d9a0047c8073 Mon Sep 17 00:00:00 2001 From: Ben Leggiero Date: Sun, 8 Dec 2019 18:12:55 -0700 Subject: [PATCH] #5: Added NativeImage --- Sources/CrossKitTypes/Cross-Kit Image.swift | 27 +++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 Sources/CrossKitTypes/Cross-Kit Image.swift diff --git a/Sources/CrossKitTypes/Cross-Kit Image.swift b/Sources/CrossKitTypes/Cross-Kit Image.swift new file mode 100644 index 0000000..da78af4 --- /dev/null +++ b/Sources/CrossKitTypes/Cross-Kit Image.swift @@ -0,0 +1,27 @@ +// +// Cross-Kit Color.swift +// Cross-Kit Types +// +// Created by Ben Leggiero on 2019-12-08. +// Copyright © 2019 BH-1-PS +// + + + +#if !ONLY_APP_KIT && canImport(UIKit) +import UIKit + + + +public typealias NativeImage = UIImage + +#elseif canImport(AppKit) +import AppKit + + + +public typealias NativeImage = NSImage + +#else +#error("Unsupported platform; neither UIKit nor AppKit") +#endif