-
Notifications
You must be signed in to change notification settings - Fork 147
Fix wrap content calculation by filter hidden views #280
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
Conversation
Sources/PinLayout+WrapContent.swift
Outdated
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.
What about views with alpha = 0?
There is public visible(_ views: [UIView]) views filter that takes alpha into account -
PinLayout/Sources/Filters.swift
Line 25 in babea9c
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.
Good point, you could use the visible() here to filter views.
Sources/PinLayout+WrapContent.swift
Outdated
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.
do we need default argument value (viewFilter = .none) in private function?
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.
Not needed here, the parameter should always be specified by callers
@lucdion
lucdion
left a comment
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.
Excellent. Could you update the documentation of wrapContent (README.md)? 🙏
Sources/PinLayout+WrapContent.swift
Outdated
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.
Good point, you could use the visible() here to filter views.
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.
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.
winnisx7
commented
Dec 17, 2024
bump
why not merge?
Force rebuild
No description provided.