-
-
Notifications
You must be signed in to change notification settings - Fork 628
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
UITableViewController "out of box" install yields black gap #44
Comments
This is definitely a hack, but I currently solve this problem as follows:
|
Hi @dmur [self followScrollView:self.tableView] making sure that your navbar is not translucent.
I hope this helps. |
Thanks for that. Unfortunately, updating to the head commit does not resolve the issue for me, I still need to use the workaround above to avoid the black gap. It's not a navigation bar translucency issue, mine is opaque. FWIW, I wasn't sure if UITableViewController was supported because the example "AMTableViewController" is actually a UIViewController subclass. Perhaps that's the difference here. |
Yep, you're right, it's probably the UITableViewController. |
After some tinkering I can safely say that it can't be done. When you try to resize the tableview, the infamous black bar appears. It happens even if you resize the table manually. |
@andreamazz I tried switching to UIViewController, but when the navigation bar is contracted, I get an extra 44px space at the bottom of the table. I'm guessing this is because AMScrollingNavbar doesn't change the view's frame when it contracts the nav bar (i.e. intended behavior)? Or is this a bug? Thanks |
Did you set the bottom constraint on your table to hug the bottom of its superview? |
Yeah, I set the constraints as defined in the README (0 for all sides). |
Hi @dmur |
Hey, cheers on the video -- loved the music :) Unfortunately I couldn't tell if the example in the video has the same issue as I'm describing or not. The problem would be visible if, after integrating the scrolling navbar, when you scroll to the bottom of the table, there is a gap == 44px (because the frame of the table view no longer extends to the bottom of its superview). Our setup is different in that we have a tab bar at the bottom. However I've a few minutes now, so I'll go ahead and replicate your example and then confirm whether or not that setup demonstrates the same issue. |
Actually, looks like this is unrelated to this project, just has to do with using UITableView within a UIViewController that's embedded in a tab bar. To fix I just had to redo the constraints after adding the view controller relationship to the tab bar. Sorry for the trouble. |
No trouble at all. I'm glad it's working. |
I'm also getting the black bar when using a UITableViewController (I have to use a UITableViewController) – I have read the comments above but can't understand how to resolve the issue, can you advise @dmur @andreamazz ? Thank you |
@dawson See my ugly hack above to work around the black bar, in the second post. Just use that implementation for your scrollViewDidScroll in the UITableViewController (it's a UIScrollViewDelegate as well, since UITableViewDelegate inherits from UIScrollViewDelegate), and it should remove the black bar. However, also note that I have not used that code in production, and it could have some unintended bugs! |
Hi, thanks for this great library. 👍
I couldn't find any documentation on using the project with UITableViewController, and when I use it with a table view controller "out of the box":
[self followScrollView:self.tableView]
there is a 64px gap added to the frame as soon as I start scrolling.
The text was updated successfully, but these errors were encountered: