Skip to content

Commit 6db3cc1

Browse files
committed
📝 :: pin.keyBoardLayout
1 parent a8eda2b commit 6db3cc1

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

README.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1229,6 +1229,7 @@ PinLayout expose them using these properties:
12291229
1. **`UIView.pin.safeArea`**: Expose UIKit `UIView.safeAreaInsets` / `UIView.safeAreaLayoutGuide`.
12301230
2. **`UIView.pin.readableMargins`**: Expose UIKit `UIView.readableContentGuide`.
12311231
3. **`UIView.pin.layoutMargins`**: Expose UIKit `UIView.layoutMargins` / `UIView.layoutMarginsGuide`.
1232+
4. **`UIView.pin.keyBoardLayout`**: Expose UIKit `UIView.keyboardLayoutGuide`.
12321233

12331234
The following image display the 3 areas on an iPad in landscape mode.
12341235

@@ -1360,6 +1361,20 @@ PinLayout's `UIView.pin.layoutMargins` property expose directly the value of UIK
13601361

13611362
<br/>
13621363

1364+
### 4. pin.keyBoardLayout:
1365+
1366+
##### Property:
1367+
* **`pin.keyBoardLayout: UIEdgeInset`**
1368+
PinLayout's `UIView.pin.keyBoardLayout` property expose directly the value of UIKit [`UIView.keyboardLayoutGuide`](https://developer.apple.com/documentation/uikit/keyboards_and_input/adjusting_your_layout_with_keyboard_layout_guide). This is really useful when layout adjustment due to the keyboard is required.
1369+
1370+
Bottom of safe area when the keyboard undocked
1371+
1372+
##### Usage example:
1373+
```swift
1374+
view.pin.bottom(pin.keyBoardLayout.top)
1375+
```
1376+
1377+
13631378
<a name="wrapContent"></a>
13641379
## WrapContent
13651380

@@ -1624,7 +1639,7 @@ PinLayout can display warnings in the console when pin rules cannot be applied o
16241639
* The newly pinned attributes conflict with other already pinned attributes.
16251640
Example:
16261641
`view.pin.left(10).right(10).width(200)`
1627-
👉 Layout Conflict: `width(200) won't be applied since it conflicts with the following already set properties: left: 0, right: 10.`
1642+
👉 Layout Conflict: `width(200) won't be applied since it conflicts with the following already set properties: left: 0, right: 10.`
16281643

16291644
* The newly pinned attributes have already been set to another value.
16301645
Example:

0 commit comments

Comments
 (0)