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
13691369
13701370 Bottom of safe area when the keyboard undocked
13711371
1372+ This property can be used from iOS 15 and above.
1373+
13721374##### Usage example:
13731375``` swift
13741376 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> {
8383 }
8484 apply ( )
8585 }
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
8696
8797 #if os(iOS) || os(tvOS)
8898 public var safeArea : PEdgeInsets {
@@ -97,12 +107,6 @@ public class PinLayout<View: Layoutable> {
97107 }
98108 }
99109
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-
106110 public var readableMargins : PEdgeInsets {
107111 guard #available( iOS 9 . 0 , * ) else { return . zero }
108112 guard let view = view as? UIView else { return . zero }
You can’t perform that action at this time.
0 commit comments