开发者

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜