开发者

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];
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜