![](/img/trans.png)
[英]iPhone, can I have a custom UITableView cell and a background image for the table?
[英]Custom table cell background image
我正在第三次嘗試使用iPhone20框架,我似乎無法弄清楚如何將表格單元格的背景更改為UIImage而不僅僅是顏色。 誰能幫我嗎?
您可以使用如下圖像模式設置單元格contentView
的backgroundColor
:
cell.contentView.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"image.png"]];
如果單元格是UITableViewCell
或者是TTTableViewCell
衍生物(因為它們派生自UITableViewCell
),這將有效
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.