簡體   English   中英

TableView單元格顏色

[英]TableView Cell Color

我現在遇到了個問題,如何使uitableview cell 的背景色填滿整個cell ,以下是我的代碼。但它不能正常工作、、、

圖片顯示:

http://www.flickr.com/photos/53054715@N05/4898445104/

如何編碼以設置單元格視圖中的顏色?

我的代碼在下面,但是效果不佳。

cell.contentView.backgroundColor =[UIColor groupTableViewBackgroundColor];
cell.backgroundColor=[UIColor groupTableViewBackgroundColor];
cell.backgroundView.backgroundColor =[UIColor groupTableViewBackgroundColor];
cell.textLabel.backgroundColor = [UIColor groupTableViewBackgroundColor];
cell.detailTextLabel.backgroundColor = [UIColor groupTableViewBackgroundColor];

有用!

  • (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {[tableView setBackgroundColor:[UIColor groupTableViewBackgroundColor]] ;; 返回1; }

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM