Skip to content

Commit 80da6d2

Browse files
committed
♻️ :: keyBoardLayout -> keyboardLayout
1 parent 0d4cbbe commit 80da6d2

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1221,17 +1221,17 @@ This example layout an UIImageView at the top and center it horizontally, it als
12211221

12221222

12231223
<a name="safeAreaInsets"></a>
1224-
## safeArea, readable and layout margins
1224+
## safeArea, keyboardLayout, readable and layout margins
12251225

1226-
UIKit expose 3 kind of areas/guides that can be used to layout views.
1226+
UIKit expose 4 kind of areas/guides that can be used to layout views.
12271227
PinLayout expose them using these properties:
12281228

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`.
1232+
4. **`UIView.pin.keyboardLayout`**: Expose UIKit `UIView.keyboardLayoutGuide`.
12331233

1234-
The following image display the 3 areas on an iPad in landscape mode.
1234+
The following image display the 3 areas on an iPad in landscape mode. (safeArea, readableMargins, layoutMargins)
12351235

12361236
<img src="docs/images/pinlayout_example_layout_margins_landscape.png" width="440" />
12371237

@@ -1361,19 +1361,19 @@ PinLayout's `UIView.pin.layoutMargins` property expose directly the value of UIK
13611361

13621362
<br/>
13631363

1364-
### 4. pin.keyBoardLayout:
1364+
### 4. pin.keyboardLayout:
13651365

13661366
##### 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.
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.
13691369

1370-
Bottom of safe area when the keyboard undocked
1370+
Bottom of safe area when the keyboard undocked.
13711371

13721372
This property can be used from iOS 15 and above.
13731373

13741374
##### Usage example:
13751375
```swift
1376-
view.pin.bottom(pin.keyBoardLayout.top)
1376+
container.pin.bottom(view.pin.keyboardLayout.top)
13771377
```
13781378

13791379

Sources/PinLayout.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ public class PinLayout<View: Layoutable> {
8585
}
8686

8787
#if os(iOS)
88-
public var keyBoardLayout: PEdgeInsets {
88+
public var keyboardLayout: PEdgeInsets {
8989
guard #available(iOS 15.0, *) else { return .zero }
9090
guard let view = view as? UIView else { return .zero }
9191
return view.keyboardLayoutGuide

0 commit comments

Comments
 (0)