Skip to content
This repository was archived by the owner on Apr 16, 2022. It is now read-only.

Commit fb3e74e

Browse files
authored
Merge pull request #77 from natmark/natmark/fix-import-setting
Fix import setting
2 parents 1e32f9b + 963090c commit fb3e74e

19 files changed

Lines changed: 99 additions & 40 deletions

File tree

ProcessingKit.podspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = "ProcessingKit"
3-
s.version = "0.5.1"
3+
s.version = "0.6.0"
44
s.summary = "Visual Designing library for iOS."
55
s.description = <<-DESC
66
ProcessingKit is a Visual Designing library for iOS.
@@ -12,9 +12,9 @@ Pod::Spec.new do |s|
1212
s.author = { "Atsuya Sato" => "natmark0918@gmail.com" }
1313
s.osx.deployment_target = "10.11"
1414
s.ios.deployment_target = "10.0"
15-
s.platforms = { :ios => "10.0", :osx => "10.11" }
1615
s.source = { :git => "https://github.com/natmark/ProcessingKit.git", :tag => "#{s.version}" }
1716
s.source_files = "ProcessingKit/**/*.swift"
1817
s.exclude_files = "ProcessingKit/Demo.playground/*"
18+
s.ios.exclude_files = "ProcessingKit/Extensions/NSImage.swift", "ProcessingKit/Extensions/NSView.swift"
1919
s.requires_arc = true
2020
end

ProcessingKit.xcodeproj/project.pbxproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -535,6 +535,7 @@
535535
GCC_WARN_UNUSED_FUNCTION = YES;
536536
GCC_WARN_UNUSED_VARIABLE = YES;
537537
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
538+
MACOSX_DEPLOYMENT_TARGET = 10.11;
538539
MTL_ENABLE_DEBUG_INFO = YES;
539540
ONLY_ACTIVE_ARCH = YES;
540541
SDKROOT = iphoneos;
@@ -583,6 +584,7 @@
583584
GCC_WARN_UNUSED_FUNCTION = YES;
584585
GCC_WARN_UNUSED_VARIABLE = YES;
585586
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
587+
MACOSX_DEPLOYMENT_TARGET = 10.11;
586588
MTL_ENABLE_DEBUG_INFO = NO;
587589
SDKROOT = iphoneos;
588590
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";

ProcessingKit/Color/Color.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@
88

99
import Foundation
1010

11+
#if os(iOS)
12+
import UIKit
13+
#elseif os(OSX)
14+
import Cocoa
15+
#endif
16+
1117
class ColorComponents {
1218
var fill: UIColor = UIColor.white
1319
var stroke: UIColor = UIColor.clear

ProcessingKit/Constants/Constants.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@
88

99
import Foundation
1010

11+
#if os(iOS)
12+
import UIKit
13+
#elseif os(OSX)
14+
import Cocoa
15+
#endif
16+
1117
public protocol Constants {
1218
var HALF_PI: CGFloat { get }
1319
var PI: CGFloat { get }

ProcessingKit/Environment/Frame.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@
88

99
import Foundation
1010

11+
#if os(iOS)
12+
import UIKit
13+
#elseif os(OSX)
14+
import Cocoa
15+
#endif
16+
1117
class FrameComponents {
1218
var bounds: CGRect = CGRect.zero
1319
var frame: CGRect = CGRect.zero

ProcessingKit/Extensions/CGPoint.swift

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,11 @@
66
// Copyright © 2017年 Atsuya Sato. All rights reserved.
77
//
88

9-
#if !os(iOS)
10-
import Cocoa
11-
typealias CGPoint = NSPoint
9+
#if os(iOS)
10+
import UIKit
11+
#elseif os(OSX)
12+
import Cocoa
13+
typealias CGPoint = NSPoint
1214
#endif
1315

1416
extension CGPoint {

ProcessingKit/Extensions/NSImage.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@
77
//
88

99
import Foundation
10+
11+
#if os(OSX)
1012
import Cocoa
13+
#endif
1114

1215
extension NSImage {
1316
var cgImage: CGImage? {

ProcessingKit/Extensions/NSView.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@
66
// Copyright © 2017年 Atsuya Sato. All rights reserved.
77
//
88

9+
#if os(OSX)
910
import Cocoa
11+
#endif
1012

1113
extension NSView {
1214
var backgroundColor: NSColor? {

ProcessingKit/Extensions/String.swift

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,18 @@
66
// Copyright © 2017年 Atsuya Sato. All rights reserved.
77
//
88

9-
#if !os(iOS)
10-
import Cocoa
9+
#if os(iOS)
10+
import UIKit
11+
#else
12+
import Cocoa
1113
#endif
1214

1315
extension String {
1416
func height(withConstrainedWidth width: CGFloat, font: UIFont) -> CGFloat {
1517
let constraintRect = CGSize(width: width, height: .greatestFiniteMagnitude)
1618
#if os(iOS)
1719
let boundingBox = self.boundingRect(with: constraintRect, options: .usesLineFragmentOrigin, attributes: [NSFontAttributeName: font], context: nil)
18-
#else
20+
#elseif os(OSX)
1921
let boundingBox = self.boundingRect(with: constraintRect, options: .usesLineFragmentOrigin, attributes: [NSFontAttributeName: font], context: nil)
2022
#endif
2123

ProcessingKit/Extensions/UIColor.swift

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,10 @@
66
// Copyright © 2017年 Atsuya Sato. All rights reserved.
77
//
88

9-
#if !os(iOS)
10-
import Cocoa
9+
#if os(iOS)
10+
import UIKit
11+
#elseif os(OSX)
12+
import Cocoa
1113
#endif
1214

1315
extension UIColor {

0 commit comments

Comments
 (0)