iOS疯狂详解之TableView以及TableViewCell背景设置

来源:互联网 发布:macbook视频制作软件 编辑:程序博客网 时间:2024/05/16 20:28
TableViewCell背景设置


-(void)tableView:(UITableView *)tableViewwillDisplayCell:(UITableViewCell *)cellforRowAtIndexPath:(NSIndexPath *)indexPath{

  cell.backgroundView = [[UIImageViewalloc]initWithImage:[UIImage imageNamed:@"58rowWrap.png"]];//cell的背景图
  cell.textLabel.backgroundColor = [UIColorclearColor];
}

 

TableView背景设置

 

UIImageView *tableBg = [[UIImageView alloc] initWithImage:[UIImageimageNamed:@"XXX.png"]];
[yourTable setBackgroundView:tableBg];
[tableBg release];

0 0
原创粉丝点击