Skip to content

Commit 5baaa20

Browse files
committed
Update documentation
1 parent 33c51b4 commit 5baaa20

File tree

4 files changed

+17
-12
lines changed

4 files changed

+17
-12
lines changed

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1367,17 +1367,17 @@ The property expose the `UIKit` value [`UIView.keyboardLayoutGuide`](https://dev
13671367
<a name="wrapContent"></a>
13681368
## WrapContent
13691369

1370-
The following methods are useful to adjust view's width and/or height to wrap all its subviews. These methods also adjust subviews position to create a tight wrap.
1370+
The following methods are useful to adjust view's width and/or height to wrap all its subviews that are included in the layout. These methods also adjust subviews position to create a tight wrap.
13711371

13721372
**Methods:**
13731373

13741374
* **`wrapContent()`**
13751375
**`wrapContent(padding: CGFloat)`**
13761376
**`wrapContent(padding: UIEdgeInsets)`**
1377-
Adjust the view's width and height to wrap all its subviews. The method also adjusts subviews's position to create a tight wrap. It is also possible to specify an optional padding around all subviews.
1377+
Adjust the view's width and height to wrap all its subviews that are included in the layout. The method also adjusts subviews's position to create a tight wrap. It is also possible to specify an optional padding around all subviews.
13781378
* **`wrapContent(:WrapType)`**
13791379
**`wrapContent(:WrapType, padding: CGFloat)`** **`wrapContent(:WrapType, padding: UIEdgeInsets)`**
1380-
Adjust the view's width AND/OR height to wrap all its subviews. Accept a WrapType parameter to define the wrapping type. It is also possible to specify an optional padding around all subviews.
1380+
Adjust the view's width AND/OR height to wrap all its subviews that are included in the layout. Accept a WrapType parameter to define the wrapping type. It is also possible to specify an optional padding around all subviews.
13811381

13821382
**Types:**
13831383

Sources/Layoutable.swift

+5
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,11 @@ public protocol Layoutable: AnyObject, Equatable, CustomDebugStringConvertible {
2929
var superview: PinView? { get }
3030
var subviews: [PinView] { get }
3131

32+
/// A Boolean value that determines whether the view is included in the PinLayout's layout.
33+
///
34+
/// An excluded view does not take up space in the layout
35+
/// when using `wrapContent(_:padding:_:)` or `autoSizeThatFits(_:layoutClosure:)`.
36+
/// The default value is `true`.
3237
var isIncludedInPinLayout: Bool { get set }
3338

3439
func getRect(keepTransform: Bool) -> CGRect

Sources/PinLayout+WrapContent.swift

+6-6
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,15 @@ import AppKit
2525

2626
extension PinLayout {
2727
/**
28-
Adjust the view's width & height to wrap all its subviews. The method also adjust subviews position to create a tight wrap.
28+
Adjust the view's width & height to wrap all its subviews that are included in the layout. The method also adjust subviews position to create a tight wrap.
2929
*/
3030
@discardableResult
3131
public func wrapContent() -> PinLayout {
3232
return wrapContent(.all, padding: PEdgeInsets(top: 0, left: 0, bottom: 0, right: 0), { return "wrapContent()" })
3333
}
3434

3535
/**
36-
Adjust the view's width & height to wrap all its subviews. The method also adds a padding around all subviews.
36+
Adjust the view's width & height to wrap all its subviews that are included in the layout. The method also adds a padding around all subviews.
3737

3838
- Parameters:
3939
- padding: Specify a padding value.
@@ -45,7 +45,7 @@ extension PinLayout {
4545

4646
/**
4747
The method...
48-
- Adjust the view's width and height to wrap all its subviews.
48+
- Adjust the view's width and height to wrap all its subviews that are included in the layout.
4949
- Adjust subviews's position to create a tight wrap.
5050
- Apply padding around all subviews.
5151

@@ -59,7 +59,7 @@ extension PinLayout {
5959

6060
/**
6161
The method...
62-
- Adjust the view's width and height to wrap all its subviews.
62+
- Adjust the view's width and height to wrap all its subviews that are included in the layout.
6363
- Adjust subviews's position to create a tight wrap.
6464

6565
- Parameters:
@@ -72,7 +72,7 @@ extension PinLayout {
7272

7373
/**
7474
The method...
75-
- Adjust the view's width and height to wrap all its subviews.
75+
- Adjust the view's width and height to wrap all its subviews that are included in the layout.
7676
- Adjust subviews's position to create a tight wrap.
7777
- Apply padding around all subviews.
7878

@@ -87,7 +87,7 @@ extension PinLayout {
8787

8888
/**
8989
The method...
90-
- Adjust the view's width and height to wrap all its subviews.
90+
- Adjust the view's width and height to wrap all its subviews that are included in the layout.
9191
- Adjust subviews's position to create a tight wrap.
9292
- Apply padding around all subviews.
9393

Sources/Types.swift

+3-3
Original file line numberDiff line numberDiff line change
@@ -186,11 +186,11 @@ public enum FitType {
186186
}
187187

188188
@objc public enum WrapType: Int {
189-
/// Adjust the view's width AND height to wrap all its subviews.
189+
/// Adjust the view's width AND height to wrap all its subviews that are included in the layout.
190190
case all
191-
/// Adjust only the view's width to wrap all its subviews. The view's height won't be modified.
191+
/// Adjust only the view's width to wrap all its subviews that are included in the layout. The view's height won't be modified.
192192
case horizontally
193-
/// Adjust only the view's height to wrap all its subviews. The view's width won't be modified.
193+
/// Adjust only the view's height to wrap all its subviews that are included in the layout. The view's width won't be modified.
194194
case vertically
195195
}
196196

0 commit comments

Comments
 (0)