[英]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.