自己绘制cell
自己画分割线
3点
self.view.backgroundColor = [UIColorclearColor];
gradeTwoTableView.backgroundColor = [UIColorclearColor];
gradeTwoTableView.backgroundView.backgroundColor = [UIColorclearColor];
gradeTwoTableView.separatorColor = [UIColorclearColor];//1
//cell的高50
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
return 50; //2
}
//画线的位置为49
UIImageView* lineImageView = [[UIImageView alloc] initWithFrame:CGRectMake(self.frame.size.width*0.023, 49, 298, 1)];//3
lineImageView.image = [MHFile imageWithResourceName:@"separate.png"];
[self addSubview:lineImageView];
[lineImageView release];
自己画框线
//初始化背景
setttingTableView.separatorColor = [UIColorclearColor];
setttingTableView.backgroundColor = [UIColorclearColor];
setttingTableView.backgroundView.backgroundColor = [UIColorclearColor];
setttingTableView.backgroundView = nil;
setttingTableView.separatorStyle = UITableViewCellSeparatorStyleNone;
点击的背景框无法改变需要手动改变画线的位置,系统的点击背景框无法改变

浙公网安备 33010602011771号