UITableView默认选中第一行
2015-11-26 本文已影响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];
//选择第一行