Skip to content
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

Scrolling to bottom #8

Closed
kevinrenskers opened this issue Sep 24, 2014 · 1 comment
Closed

Scrolling to bottom #8

kevinrenskers opened this issue Sep 24, 2014 · 1 comment

Comments

@kevinrenskers
Copy link

First of all, thank you so much for this example app, it helped me a lot when moving to pure auto layout auto sizing table view cells. I've noticed a strange problem in my app and had the same problem with this example app too.

Let's say I want the table to start off scrolled all the way to the bottom, the user then has to scroll up to see previous items (like the Messages app, or any chap page). So in viewWillAppear: I'd call something like this:

NSUInteger index = [self.tableView numberOfRowsInSection:0] - 1;
NSIndexPath *indexPath = [NSIndexPath indexPathForItem:index inSection:0];
[self.tableView scrollToRowAtIndexPath:indexPath atScrollPosition:UITableViewScrollPositionBottom animated:NO];

What you'll notice is that the table is scrolled to somewhere in the middle instead of the bottom, and when you scroll up, the previous cells pop into place while causing the entire table to jump. It's very very ugly.

I've also asked about the problem on stackoverflow but no answers yet. Maybe you have any ideas on how to solve this?

@smileyborg
Copy link
Owner

Yes, this is a known Apple bug. Here is another StackOverflow question about the same issue that I answered: http://stackoverflow.com/a/25800080/796419

Here's a bit more discussion from a while back: https://github.com/caoimghgin/TableViewCellWithAutoLayout/issues/13

siuying pushed a commit to siuying/TableViewCellWithAutoLayoutiOS8 that referenced this issue Jan 28, 2015
Call [super updateConstraints] as the final step in updateConstraints implementation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants