views:

42

answers:

1

Hi..

I'm developing an application where the user adds new rows to an existing table. When a new row is added, i want to highlight it and make the view focus on the row if the table is scrollable.

Any ideas on how I can do this? I`m still kinda new to iphone and objective-c so any help is highly appreciated ;)

+1  A: 

If you know the NSIndexPath of the row you just added, calling selectRowAtIndexPath:animated:scrollPosition: on your table should do the trick:

[self.tableView selectRowAtIndexPath:indexPath 
                            animated:YES 
                      scrollPosition:UITableViewScrollPositionMiddle];
Adrian Kosmaczewski
ah, nice.. I know the index, so I will test this asap :)
Madoc
I got it working now with your advice, thanks!
Madoc