我在重现 UITableViewController 中的视觉故障时遇到了问题。实际上是来自 SensibleTableView 组件的 SCTableViewController。
所以我在 -viewDidLoad: 中构建了一个静态分组的 TableView。
- (void)viewDidLoad
{
[super viewDidLoad];
SCTableViewSection *sec = [SCTableViewSection sectionWithHeaderTitle:@"hdas"];
SCLabelCell *c1 = [SCLabelCell cellWithText:@"dsan"];
[sec addCell:c1];
[[self tableViewModel] addSection:sec];
}
我看到的是标签右边缘有一个奇怪的灰色细边框。 (用红色三角标示)
我应该去哪里删除这个栏?为什么它会出现?
我尝试设置 backgroundColor、图层边框、图层阴影、textShadow 等。
最佳答案
使用 UILabel.backgroundColor,设置 label 的 backgroundColor 会引发这个问题。 您可以通过 UILabel.layer.backgroundColor 设置 Layer 的 backgroundColor 来修复此错误。
“为我将背景颜色设置为清晰固定。”通过 Nuthinking。也可以修复这个错误。但在 tableView 中,这可能会稍微降低性能。
关于iphone - iOS7 UILabel 视觉故障,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18913967/