You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I traced around and it looks like the 5pt offset is coming from TopBottomAnimation.swift around lines 93~101 (bounceOffset). For UIKit-based message views the adjustMargins() function mitigates this, but I guess the layoutMargins aren't making it through the UIHostingController for some reason. (I tried adding very large layoutMarginAdditions to the MessageHostingView and nothing happened.)
Once I found where the 5 was coming from, I felt satisfied with simply adding 5pts of padding to the top of my SwiftUI message view since I only ever present it below a navigation bar. But I assume that may not work for everyone 😄
The text was updated successfully, but these errors were encountered:
Hmm, yeah. Thanks for bringing that up. The way SwiftMessages deals with safe area in UIKit is totally not applicable in SwiftUI. I need to think on it, but at least the workaround is pretty simple.
When displaying a SwiftUI-based message view below the navigation bar, the top of the message view is clipped by 5pts.
Here's a sample project that illustrates the issue: SwiftMessagesHostedTopMargin.zip
I traced around and it looks like the 5pt offset is coming from TopBottomAnimation.swift around lines 93~101 (
bounceOffset
). For UIKit-based message views theadjustMargins()
function mitigates this, but I guess thelayoutMargins
aren't making it through theUIHostingController
for some reason. (I tried adding very largelayoutMarginAdditions
to theMessageHostingView
and nothing happened.)Once I found where the 5 was coming from, I felt satisfied with simply adding 5pts of padding to the top of my SwiftUI message view since I only ever present it below a navigation bar. But I assume that may not work for everyone 😄
The text was updated successfully, but these errors were encountered: