Iphone: Autoscroll on selected indexPath in table
I`m开发者_JAVA百科 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?
Works perfectly for me. I tried it in a test application and posted the code here: Sample App
精彩评论