开发者

Is there a way to move row to the selected row in UITableView

开发者 https://www.devze.com 2022-12-21 22:25 出处:网络
I hope to know if there is a way to move row to the selected row in UITableView. for example, row are:

I hope to know if there is a way to move row to the selected row in UITableView.

for example, row are:

1 2 3 4 5 6 7 8

only 3 rows are visible,开发者_如何学编程

I hope to move row directly to 7

Welcome any comment

Thanks

interdev


Use scrollToRowAtIndexPath like this:

NSIndexPath* ip = [NSIndexPath indexPathForRow:7 inSection:0];
[tableView scrollToRowAtIndexPath:ip atScrollPosition:UITableViewScrollPositionTop animated:YES];
0

精彩评论

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