File tree Expand file tree Collapse file tree 2 files changed +12
-6
lines changed Expand file tree Collapse file tree 2 files changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -1369,6 +1369,8 @@ PinLayout's `UIView.pin.keyBoardLayout` property expose directly the value of UI
1369
1369
1370
1370
Bottom of safe area when the keyboard undocked
1371
1371
1372
+ This property can be used from iOS 15 and above.
1373
+
1372
1374
##### Usage example:
1373
1375
``` swift
1374
1376
view.pin .bottom (pin.keyBoardLayout .top )
Original file line number Diff line number Diff line change @@ -83,6 +83,16 @@ public class PinLayout<View: Layoutable> {
83
83
}
84
84
apply ( )
85
85
}
86
+
87
+ #if os(iOS)
88
+
89
+ public var keyBoardLayout : PEdgeInsets {
90
+ guard #available( iOS 15 . 0 , * ) else { return . zero }
91
+ guard let view = view as? UIView else { return . zero }
92
+ return view. keyboardLayoutGuide
93
+ }
94
+
95
+ #endif
86
96
87
97
#if os(iOS) || os(tvOS)
88
98
public var safeArea : PEdgeInsets {
@@ -97,12 +107,6 @@ public class PinLayout<View: Layoutable> {
97
107
}
98
108
}
99
109
100
- public var keyBoardLayout : PEdgeInsets {
101
- guard #available( iOS 15 . 0 , * ) else { return . zero }
102
- guard let view = view as? UIView else { return . zero }
103
- return view. keyboardLayoutGuide
104
- }
105
-
106
110
public var readableMargins : PEdgeInsets {
107
111
guard #available( iOS 9 . 0 , * ) else { return . zero }
108
112
guard let view = view as? UIView else { return . zero }
You can’t perform that action at this time.
0 commit comments