箭頭
1.添加iOS系統(tǒng)自帶的cell的箭頭
cell.accessoryType=UITableViewCellAccessoryDisclosureIndicator;
2.去掉tableviewcell的間隔下劃線
_tableView.separatorStyle=UITableViewCellSeparatorStyleNone;
3.添加自定義間隔線,加在下面的這個(gè)方法里面
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
//這里
}
如下:
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
UIView*lbl = [[UIViewalloc]init];//定義一個(gè)label用于顯示cell之間的分割線(未使用系統(tǒng)自帶的分割線),也可以用view來(lái)畫(huà)分割線
lbl.frame=?CGRectMake(cell.frame.origin.x+10,?cell.frame.size.height-5,?cell.frame.size.width-20,1);
lbl.backgroundColor=??[UIColorlightGrayColor];
[cell.contentViewaddSubview:lbl];
}