-
-
Notifications
You must be signed in to change notification settings - Fork 342
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
Issue with bottomLayoutGuide #39
Comments
While bottom layout guide is maintained correctly, and indeed constraints with the guide are also maintained correctly. However it seems iOS does not update table view content insets automatically when they change. In my music demo project, I added the following code in the album controller to maintain insets correctly: override func viewDidLayoutSubviews() {
super.viewDidLayoutSubviews()
let insets = UIEdgeInsetsMake(topLayoutGuide.length, 0, bottomLayoutGuide.length, 0)
tableView.contentInset = insets
tableView.scrollIndicatorInsets = insets
} |
If you are still interested, top and bottom insets are maintained in the cryptically named (for a reason) methods |
Stands for: - (UIEdgeInsets)_edgeInsetsForChildViewController:(UIViewController *)childViewController insetsAreAbsolute:(BOOL *)absolute; |
That viewDidLayoutSubviews code totally fixed it. Thank you! 👍🏼 |
Hi Leo,
I'm having an issue with the popup bar and the bottom layout guide. You mention in the docs that your "framework will attempt to correct the bottom layout guide of the container controller and its child controllers as the popup bar is presented and dismissed." I'm wondering where exactly these calls are being made so that I can trace where it's going wrong in my app.
I attach your framework to my root view controller (a UITabBarController) whose child views are all UINavigationControllers, which in turn contain UITableViewControllers. Here's an example of the issue I'm having:
Once your bar is presented, it overlaps the table view, as you'd expect.
However, when I try to scroll to make the bottommost row visible, the app springs it back below the popup bar. I'm presuming this is because the table view controller doesn't know about the bottom layout guide.
I'm wondering how I can go about debugging this. I'd like to assume it's a potential problem with my code before blaming your framework, so I'm wondering where your framework attempts to set the bottomLayoutGuide so that I can trace the call down my view hierarchy and hopefully identify the issue.
Thanks!
The text was updated successfully, but these errors were encountered: