0

There are two view controllers. VC-a pushes VC-b which embedded a tablewview.

Assume this tableview has 50 datasources, before VC-b is pushed the datasource had prepared.

How can I scroll this datasource to the bottom i.e. the bottom of the tableview show the latest datasource.

I've already try

CGPointMake(0, self.parentConversationViewController.tableView.contentSize.height - self.parentConversationViewController.tableView.frame.size.height);

and

[self.tableView scrollToRowAtIndexPath:atScrollPosition:animated:animated];

These two method did not scroll to the bottom, but almost there. If I call above method in viewDidAppear, I will show a 'animation'. Don't want that.

Eric Aya
  • 69,473
  • 35
  • 181
  • 253
Dean Lee
  • 781
  • 2
  • 7
  • 13
  • make indexPath that is the last index of array that is holding all models for that view? and then use scrollToRowAtIndexPath ? – Stefan Jun 21 '17 at 12:35
  • scrollToRowAtIndexPath should do it. You might want to state how you call it exactly (with which parameters), and why you think it does not do what you want. – fishinear Jun 21 '17 at 14:05
  • If you don't want the animation, then call the method in `viewWillAppear`, with `NO` for the animated parameter. – fishinear Jun 21 '17 at 14:06

0 Answers0