Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Scroll bar doesn't reach the end of the tableview

I don't know exactly why, but the scrollbar of my tableview never reaches the end.

This is the middle of the tableview, everything looks fine

enter image description here

But when I reach the end

enter image description here

The scrollbar doesn't reach the end...

I guess my constraints are ok (I'm using autolayout), because besides the scrollbar, the tableview is well displayed.

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

enter image description here

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

Thanks in advance

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

Edit2 : If I change the bottom constraint to "Bottom of the view" instead of "Bottom layout guide", this works well.

The problem is that my view doesn't have a correct height, because it is supposed to go under the tabbar.

Any ideas ?

like image 800
Vico Avatar asked Jul 30 '14 20:07

Vico


2 Answers

I've fixed the problem by settings the property automaticallyAdjustsScrollViewInsets to NO.

More details could be found here: https://stackoverflow.com/a/21302259/1295537

like image 156
Vico Avatar answered Oct 22 '22 07:10

Vico


What could be happening is you have clipping disabled, and the frame for your tableView isn't the entire height of the view.

Or, you could have contentInsets set, which changes the size of the scroll indicator as well.

like image 26
Vadoff Avatar answered Oct 22 '22 06:10

Vadoff