Iphone: Highlight row when added
I'm develop开发者_运维问答ing 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 ;)
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];
精彩评论