Skip to content

Commit

Permalink
Merge pull request #30 from MikeMorawski/main
Browse files Browse the repository at this point in the history
Fix for iOS 16 infinite render loop
  • Loading branch information
dkk authored Oct 19, 2022
2 parents 52ac086 + 008f37c commit 26c8d7f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/WrappingHStack/InternalWrappingHStack.swift
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ struct InternalWrappingHStack: View {
let hostingController = NSHostingController(rootView: HStack(spacing: spacing.estimatedSpacing) { anyView })
#endif

let itemWidth = hostingController.view.intrinsicContentSize.width
let itemWidth = hostingController.sizeThatFits(in: CGSize(width: CGFloat.greatestFiniteMagnitude, height: CGFloat.greatestFiniteMagnitude)).width

if result.currentLineWidth + itemWidth + spacing.estimatedSpacing > width {
currentLineWidth = itemWidth
Expand Down

0 comments on commit 26c8d7f

Please sign in to comment.