美文网首页
UITableView默认选中第一行

UITableView默认选中第一行

作者: 减苏 | 来源:发表于2015-11-26 14:58 被阅读1441次

NSIndexPath*ip =

[NSIndexPath indexPathForRow:0inSection:0];

[listTableViewselectRowAtIndexPath:ipanimated:YESscrollPosition:UITableViewScrollPositionTop];

[self.viewaddSubview:listTableView];

[listTableViewcellForRowAtIndexPath:0].accessoryType=UITableViewCellAccessoryCheckmark;

//UITableView自动选择第一行

//NSIndexPath *ip=[NSIndexPathindexPathForRow:0 inSection:0];

//选择第一行

相关文章

网友评论

      本文标题:UITableView默认选中第一行

      本文链接:https://www.haomeiwen.com/subject/ixrdhttx.html