-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Views added using addsubviews are not working inside SnackbarController #1273
Comments
Interestingly, when I came from background, everything gets added as expected when using AppSnackBarController. |
Which controller is the parent of PRO TIP: self.topView.addSubview(containerView)
containerView.translatesAutoresizingMaskIntoConstraints = false
let leftConstraint = containerView.leftAnchor.constraint(equalTo: topView.leftAnchor)
let rightConstraint = containerView.rightAnchor.constraint(equalTo: topView.rightAnchor)
let horizontalConstraint = containerView.centerXAnchor.constraint(equalTo: topView.centerXAnchor)
let verticalConstraint = containerView.centerYAnchor.constraint(equalTo: topView.centerYAnchor)
NSLayoutConstraint.activate([leftConstraint, rightConstraint, horizontalConstraint, verticalConstraint]) Can be replaced by: topView.layout(containerView)
.leftRight() /// same as .left().right()
.center() /// same as .centerX().centerY() Learn more at #1185 |
Thanks for the PRO TIP. This is how I added homeSnackBarController inside my Tabbar.
Tabber Class:
|
@ahsanaasim @OrkhanAlikhanov is this still an issue? |
I solved using another navigation controller above appSnackbar which i think is a bad solution..Cuz in that case I have to use two navigationController. |
I am trying to use Snackbar in my app. I have tabBarController containing my viewControllers.
I have initiated the Snackbar Setup in the following way.
When I add homeNavigationController as my tabBarController viewcontroller item, Everything loads perfectly. This is how it looks when I add homeNavigationController directly
I have a UIPageViewController added inside the HomeContainerController which is not getting added when I use the AppSnackbarController as tabBarController viewController. But nothing is getting added as expected. This is how it looks when I use AppSnackbarController
So there must be something wrong with AppSnackbarController or I am implementing this incorrectly.
My AppSnackbarController code:
My HomeContainerController code
The text was updated successfully, but these errors were encountered: