Hi I'm going to link you a video showcasing my problem as it's somewhat hard to convey with words. UITableView not scrolling to bottom In the video I'm hitting a button which adds items to the list. Note that I am not stopping at Item 16, and that I am still adding more items to the list that don't get displayed. Eventually, upon added new items, the list will automatically scroll up via
[_items addObject:[NSString stringWithFormat:@"Trawl %d", count]];
[self.tbl reloadData];
[self.tbl scrollToRowAtIndexPath:[NSIndexPath indexPathForItem:self.items.count - 1 inSection:0] atScrollPosition:UITableViewScrollPositionBottom animated:YES];
The main issue is towards the end of the video, where I scroll towards the last few items, but I cannot select them. Apparently the issue has to deal with the height of the UITableView. I've tried changing this in the storyboard editor but it didn't do anything. Any ideas? Thanks in advance!
Ok from what I can see and from the comments, I think it is likely that the height of your UITableView
is larger than the device screen size, which means it will not scroll down because the items haven't reached the bottom of the UITableView
's UIScrollView
.
Go to IB and set constraints so the UITableView
is equal to the view controllers width and height.
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