您的位置:首页 > 移动开发 > IOS开发

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

2014-12-10 15:24 597 查看
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];
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
相关文章推荐