19
19
20
20
import Foundation
21
21
22
- public enum LayoutDirection {
22
+ @ objc public enum LayoutDirection : Int {
23
23
case auto
24
24
case ltr
25
25
case rtl
@@ -28,7 +28,7 @@ public enum LayoutDirection {
28
28
/// Control how PinLayout will calls `UIView.safeAreaInsetsDidChange` when the `UIView.pin.safeArea` change.
29
29
/// This support is usefull only on iOS 8/9/10. On iOS 11 `UIView.safeAreaInsetsDidChange` is supported
30
30
/// natively so this settings have no impact.
31
- public enum PinSafeAreaInsetsDidChangeMode {
31
+ @ objc public enum PinSafeAreaInsetsDidChangeMode : Int {
32
32
/// PinLayout won't call `UIView.safeAreaInsetsDidChange` on iOS 8/9/10.
33
33
case disable
34
34
/// PinLayout will call `UIView.safeAreaInsetsDidChange` only if the UIView implement the PinSafeAreaInsetsUpdate protocol.
@@ -38,11 +38,11 @@ public enum PinSafeAreaInsetsDidChangeMode {
38
38
}
39
39
40
40
@objc public class Pin : NSObject {
41
- public static var layoutDirection = LayoutDirection . ltr
41
+ @ objc public static var layoutDirection = LayoutDirection . ltr
42
42
43
43
#if os(iOS) || os(tvOS)
44
44
/// Controls how PinLayout will calls `UIView.safeAreaInsetsDidChange` when the `UIView.pin.safeArea` change.
45
- public static var safeAreaInsetsDidChangeMode : PinSafeAreaInsetsDidChangeMode = . optIn {
45
+ @ objc public static var safeAreaInsetsDidChangeMode : PinSafeAreaInsetsDidChangeMode = . optIn {
46
46
didSet {
47
47
PinSafeArea . safeAreaInsetsDidChangeMode = safeAreaInsetsDidChangeMode
48
48
}
@@ -51,9 +51,9 @@ public enum PinSafeAreaInsetsDidChangeMode {
51
51
52
52
53
53
#if DEBUG
54
- public static var logWarnings = true
54
+ @ objc public static var logWarnings = true
55
55
#else
56
- public static var logWarnings = false
56
+ @ objc public static var logWarnings = false
57
57
#endif
58
58
59
59
/**
@@ -65,15 +65,15 @@ public enum PinSafeAreaInsetsDidChangeMode {
65
65
66
66
static fileprivate var isInitialized = false
67
67
68
- public static func initPinLayout( ) {
68
+ @ objc public static func initPinLayout( ) {
69
69
#if os(iOS) || os(tvOS)
70
70
guard !Pin. isInitialized else { return }
71
71
PinSafeArea . initSafeAreaSupport ( )
72
72
Pin . isInitialized = true
73
73
#endif
74
74
}
75
75
76
- public static func layoutDirection( _ direction: LayoutDirection ) {
76
+ @ objc public static func layoutDirection( _ direction: LayoutDirection ) {
77
77
self . layoutDirection = direction
78
78
}
79
79
0 commit comments