Reputation: 1625
I`m working with a tableview controller where new rows are added manually by the user on a secondary controller and then returning to the tableview with the new row highlighted.
I am using the following to highlight the row:
[self.shoppingCartTableView selectRowAtIndexPath:self.selectedIndexPath
animated:YES
scrollPosition:UITableViewScrollPositionMiddle];
The highlighting works, but it does not automatically scroll to the row. Am I doing something wrong, or is there another way to make it work as intended?
Upvotes: 1
Views: 520
Reputation: 3166
Works perfectly for me. I tried it in a test application and posted the code here: Sample App
Upvotes: 1