Skip to content

Commit 88dac6e

Browse files
committed
Use includedSubviews in autoSizeThatFits(_:layoutClosure:)
1 parent b7401ac commit 88dac6e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/Extensions/UIView+PinLayout.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ extension UIView: AutoSizeCalculable {
143143

144144
layoutClosure()
145145

146-
let boundingRect = subviews.compactMap({ $0.autoSizingRectWithMargins }).reduce(CGRect.zero) { (result: CGRect, autoSizingRect: CGRect) -> CGRect in
146+
let boundingRect = subviewsIncludedInSizeCalculation.compactMap({ $0.autoSizingRectWithMargins }).reduce(CGRect.zero) { (result: CGRect, autoSizingRect: CGRect) -> CGRect in
147147
return result.union(autoSizingRect)
148148
}
149149

0 commit comments

Comments
 (0)