Tableview 默認選中第一行以及選中背景自定義

//默認選中第一行

NSIndexPath *firstPath = [NSIndexPath indexPathForRow:0inSection:0];

[self._tableView selectRowAtIndexPath:firstPath animated:YESscrollPosition:UITableViewScrollPositionTop];

//選中背景自定義

cell.selectedBackgroundView=[[[UIImageView alloc]initWithImage:[UIImage imageNamed:@"cell_selected_bg"]]autorelease];

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章