iOS瘋狂詳解之TableView以及TableViewCell背景設置

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];

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