Skip to content

Commit

Permalink
Update EpoxySwiftUIHostingView.swift
Browse files Browse the repository at this point in the history
  • Loading branch information
bryankeller committed Apr 22, 2024
1 parent 93af629 commit 78ba0cd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Sources/EpoxyCore/SwiftUI/EpoxySwiftUIHostingView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,8 @@ public final class EpoxySwiftUIHostingView<RootView: View>: UIView, EpoxyableVie
// margins change, it's possible for the hosting view to render with incorrect margins,
// causing a visual jump as the layout resolves over multiple runloop iterations. This seems
// to be more common with top and bottom bars, since they can be laid out early during view
// controller transitions.
// controller transitions. If this works well, we may make this the default behavior for all
// SwiftUI views.
viewController.view.setNeedsLayout()
viewController.view.layoutIfNeeded()
viewController.view.invalidateIntrinsicContentSize()
Expand Down

0 comments on commit 78ba0cd

Please sign in to comment.