使用笔尖的 UITableViewCell 背景颜色

发布于 2024-12-25 02:54:46 字数 188 浏览 3 评论 0原文

在 Xcode 中,我有 UITableViewCell 笔尖,其中包含一个标签,并且在笔尖中我为 UITableViewCell 背景和标签文本背景颜色自定义了颜色。 当表格显示时,标签的文本以指定的颜色显示,但单元格的背景颜色不显示;相反,UITableView 笔尖的背景颜色显示为每个单元格的背景。 为什么?单元格背景颜色属性是否在某些时候被忽略或覆盖?

In Xcode, I have UITableViewCell nib which holds a label, and in the nib I customized colors for both the UITableViewCell background and the label text background color.
When the table displays, the label's text displays in the specified color, but the cell's background color does not; rather the background color of the UITableView nib is what shows as each cell's background.
Why? Is the cell background color attribute being ignored or overridden at some point?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文