The scrollbar does not reach the end of the table.

I don’t know exactly why, but the scroll bar of my table never reaches the end.

This is the middle part of the table, everything looks fine

enter image description here

But when I get to the end

enter image description here

The scrollbar does not reach the end ...

I think my limitations are fine (I use autolayout), because besides the scroll bar, the table display is well displayed.

My view controller is a UIViewController and contains only a UITableView . Here is a screenshot that summarizes it:

enter image description here

No restriction is added by code. Do you know how I could debug this?

Thank you in advance

Edit: I tried to remove and recreate the view controller (by copying and pasting the UITableView ) the problem is still here.

Edit2: If I changed the lower limit to “Bottom of the view” instead of the “Layout Guide at the bottom”, this works well.

The problem is that my view does not have the correct height, because it must go under the panel.

Any ideas?

+6
source share
4 answers

I fixed the problem by setting automaticallyAdjustsScrollViewInsets to NO .

More information can be found here: fooobar.com/questions/96127 / ...

+2
source

What could happen, you turned off clipping, and the frame for your tableView is not the whole height of the view.

Or you can set contentInsets, which will also resize the scroll indicator.

+1
source

For those who have not mastered these solutions, try this. It doesn't make sense, but it works (in my case I need a UITableView for other views, so I just added a dummy view)

fooobar.com/questions/22384 / ...

0
source

Instead of the usual table view and drag controller in a storyboard (which I assume you are doing), have you considered using Table View Controller? You should not have this problem in this case (I never had it). You can easily embed a table view controller in a tab bar controller.

Hope this helps!

-1
source

Source: https://habr.com/ru/post/973129/


All Articles