My UITableView does not scroll to the bottom and stops before all the content can be displayed (cuts off the last few rows). I have checked that my UITableView is equal to the screen size, but the content size is greater than screen and table height. I am not sure why this is happening.
1) Do you have a UITabBar
at the bottom of your screen? This content may be covered by the bar. IF so, go your storyboard and to your UIViewController
you have the UITableView
placed in and uncheck it's Under Bottom Bars
boolean.
2) You might have an NSLayoutConstraint
set at the bottom that is to the negative. Meaning your UITableView
will be extending to the bottom of the screen. IF so, reset your UITableView
's bottom constraint to 0.0.
3) You might want to try using UITableView
scroll method. Get the index of the last cell:
[yourTableView scrollToRowAtIndexPath:lastCellIndex
atScrollPosition:UITableViewScrollPositionTop
animated:YES];
4) UITableView
is subclassed from UIScrollView
. Therefore you can treat it as such.
If ever cell in the UITableView
has the same height, you can multiple the number of objects in your datasource times the height of the cell, then you know what value to enter into your UIScrollView/TableView
method as contentOffset:
(void)setContentOffset:(CGPoint)contentOffset animated:(BOOL)animated
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With