views:

149

answers:

1

Hi..

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?

+1  A: 

Works perfectly for me. I tried it in a test application and posted the code here: Sample App

Hua-Ying
Hey, thanks for your effort, especially with your sample app!Guess it is something else thats wrong with my code then.. back to debugging ;)
Madoc