zaniluca / SwiftUISnackbar

A simple Snackbar view extension for your SwiftUI application
MIT License
34 stars 4 forks source link

SnackBar Hides behind TabView #5

Open sangampokharel opened 7 months ago

sangampokharel commented 7 months ago

SomeView() .snackbar(isShowing: snackBarVisible, title: "Validation Error !", text: showMessage.wrappedValue, style: .custom(.red),actionText: "Dismiss") { changePasswordVM.hideSnackBar() }

sangampokharel commented 7 months ago
Screenshot 2024-02-20 at 4 45 58 PM

The red one is the snacbar used !

zaniluca commented 7 months ago

@sangampokharel hi! I think the issue might be in the z-depth. Have you tried adding a .zIndex(_:) to the TabBar and set it to 0?

I had the same problem and this trick solved it for me, let me know