-
Notifications
You must be signed in to change notification settings - Fork 144
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add isIncludedInPinLayoutSizeCalculation
property to Layoutable
#268
base: master
Are you sure you want to change the base?
Add isIncludedInPinLayoutSizeCalculation
property to Layoutable
#268
Conversation
152b8b6
to
cbb1684
Compare
isIncludedInPinLayout
property to Layoutable
isIncludedInPinLayoutSizeCalculation
property to Layoutable
Hi @lucdion, I've made a proposal to exclude subviews from the size calculation without removing them. I'd appreciate it if you could review it! :) |
cbb1684
to
38bbd92
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice addition. Few comments
|
||
**Methods:** | ||
|
||
* **`wrapContent()`** | ||
**`wrapContent(padding: CGFloat)`** | ||
**`wrapContent(padding: UIEdgeInsets)`** | ||
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. | ||
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should add an URL link that point to the documentation of the new property for the string are included in the layout
* **`wrapContent(:WrapType)`** | ||
**`wrapContent(:WrapType, padding: CGFloat)`** **`wrapContent(:WrapType, padding: UIEdgeInsets)`** | ||
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. | ||
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here
7a35f5b
to
7afd896
Compare
Just missing changes related to the documentation 🙏 |
I'll let you know when the documentation is complete! |
This PR adds
isIncludedInPinLayoutSizeCalculation
property toLayoutable
.This can be useful when calculating the size of a view that contains subviews that may disappear based on conditions after the initial load. (similary to
UIStackView
'sarrangedSubviews
, orFlexLayout
'sisIncludedInLayout
)