PopupView
PopupView copied to clipboard
Unable to show toast when tab bar is visible
I've been trying to show a toast in my custom View (which I'm wrapping in a UIViewController and then in a UITabBarController). When the tab bar is hidden it works just fine, but when the tab bar is shown it hovers the toast (I suppose) so it never appears. I want the toast to appear above the tab bar, Is there any way to achieve this? O am I just using it the wrong way?
Tab Bar Hidden | Tab Bar Visible |
---|---|
![]() |
![]() |
Found a workaround. It looks like if you apply an offset (it can be 1, for example) to the view, it works just fine. Not sure why but it works.
Hey @juandahurt, could you please attach a minimal reproducible code sample? I need to see if you are changing the main view's height when showing tabbar, how you are wrapping it all in UIViewController and what is your safe area situation. Popup view counts its position depending on the height of a view it is attached to, so it could be that you need to attach it to content of your tab control, not the whole controller. It indeed hides behind navbars and probably also tabbars since currently Apple doesn't give devs the right to display anything above them. Adding any offset could be changing safe area policy, and that is why it fixes itself. But I cannot say any of that for sure unless I see a reproducible piece of code.
I'm closing this one for now, please feel free to reopen if you are still having this issue