Skip to content

Commit 33c51b4

Browse files
committed
Use includedSubviews in autoSizeThatFits(_:layoutClosure:)
1 parent 086a02c commit 33c51b4

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
@@ -145,7 +145,7 @@ extension UIView: AutoSizeCalculable {
145145

146146
layoutClosure()
147147

148-
let boundingRect = subviews.compactMap({ $0.autoSizingRectWithMargins }).reduce(CGRect.zero) { (result: CGRect, autoSizingRect: CGRect) -> CGRect in
148+
let boundingRect = includedSubviews.compactMap({ $0.autoSizingRectWithMargins }).reduce(CGRect.zero) { (result: CGRect, autoSizingRect: CGRect) -> CGRect in
149149
return result.union(autoSizingRect)
150150
}
151151

0 commit comments

Comments
 (0)