Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions Sources/StackKit/HStackView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,7 @@ open class HStackView: UIView, StackView {
}

open override func sizeThatFits(_ size: CGSize) -> CGSize {
setNeedsLayout()
layoutIfNeeded()

layoutSubviews()
return contentSize
}

Expand Down
4 changes: 1 addition & 3 deletions Sources/StackKit/VStackView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,7 @@ open class VStackView: UIView, StackView {
}

open override func sizeThatFits(_ size: CGSize) -> CGSize {
setNeedsLayout()
layoutIfNeeded()

layoutSubviews()
return contentSize
}

Expand Down
4 changes: 1 addition & 3 deletions Sources/StackKit/WrapStackView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -215,9 +215,7 @@ open class WrapStackView: UIView {
}

open override func sizeThatFits(_ size: CGSize) -> CGSize {
setNeedsLayout()
layoutIfNeeded()

layoutSubviews()
let effectiveViewsSize = effectiveSubviews.map({ $0.frame }).reduce(CGRect.zero) { result, rect in
result.union(rect)
}.size
Expand Down