UITableView 默认选择某行的方法

来源:互联网 发布:软件安全测试 编辑:程序博客网 时间:2024/05/29 05:08

    //默认选中行,放在 reloadData 后    NSIndexPath *ip=[NSIndexPath indexPathForRow:0 inSection:2];    [tableView selectRowAtIndexPath:ip animated:YES scrollPosition:UITableViewScrollPositionBottom];    NSIndexPath *path=[NSIndexPath indexPathForItem:0 inSection:2];    [self tableView:tableView didSelectRowAtIndexPath:path];

1 0
原创粉丝点击