Skip to content

Commit ab23f42

Browse files
Luc DionLuc Dion
authored andcommitted
Complete swift package manager support
1 parent 006ee5b commit ab23f42

File tree

4 files changed

+17
-0
lines changed

4 files changed

+17
-0
lines changed

Sources/Coordinates.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@
2727

2828
import Foundation
2929

30+
#if os(iOS)
31+
import UIKit
32+
3033
class Coordinates {
3134
static func hCenter(_ view: UIView) -> CGFloat {
3235
return view.frame.minX + (view.frame.width / 2)
@@ -93,3 +96,5 @@ class Coordinates {
9396
public func setUnitTest(displayScale: CGFloat) {
9497
Coordinates.displayScale = displayScale
9598
}
99+
100+
#endif

Sources/PinLayout.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@
2727

2828
import Foundation
2929

30+
#if os(iOS)
31+
import UIKit
32+
3033
// MARK: - PinLayout UIView's extension
3134
public extension UIView {
3235
public var pin: PinLayout {
@@ -306,3 +309,5 @@ prefix operator -
306309
public prefix func - (p: Percent) -> Percent {
307310
return Percent(value: -p.value)
308311
}
312+
313+
#endif

Sources/PinLayoutImpl.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727

2828
import Foundation
2929

30+
#if os(iOS)
31+
3032
public var unitTestLastWarning: String?
3133

3234
#if DEBUG
@@ -1196,3 +1198,4 @@ extension PinLayoutImpl {
11961198
}
11971199
}
11981200

1201+
#endif

Sources/TypesImpl.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@
2727

2828
import Foundation
2929

30+
#if os(iOS)
31+
import UIKit
32+
3033
typealias Context = () -> String
3134
typealias Size = (width: CGFloat?, height: CGFloat?)
3235

@@ -151,3 +154,4 @@ extension Percent: CustomStringConvertible {
151154
}
152155
}
153156

157+
#endif

0 commit comments

Comments
 (0)