Parth Bhatt
Parth Bhatt

Reputation: 19479

How to autoscroll tableview when a new value is added to it

In my iphone app, i have a textbox and a table view.I add the item from textbox and it is added to the tableview.

I want that as I add a new item to tableview then it should autoscroll by one position so that the newly added item gets displayed at the bottom of the tableview.

How can we do this?

Please Help and Suggest

Thanks

Upvotes: 1

Views: 395

Answers (1)

Nevin
Nevin

Reputation: 7819

you can call the UITableView's

- (void)scrollToRowAtIndexPath:(NSIndexPath *)indexPath atScrollPosition:(UITableViewScrollPosition)scrollPosition animated:(BOOL)animated

with the indexPath set to your newly added row.

Upvotes: 4

Related Questions