Dri*_*met 11 user-interface objective-c uicolor ios ios5
设置我的图案我有麻烦UIColor.在iOS 5中它一切都很好,但在iOS 4.3中我遇到了问题.我添加了一个图像以便更好地理解.我已经谷歌搜索了一下,发现答案可能是opaque属性的设置NO.但我已经设置每隔view,contentView,backgroundView,tableViewCell它的opaque价值NO.

您可以看到分隔符颜色为黑色,其中图像具有透明度
Pau*_*ott 18
这似乎是iOS 4.3中的一个错误,它在5.0中修复.
为了使这在4.3上工作,在将视图的backgroundColor设置为模式图像之后,您需要将视图和图层都设置为非不透明,如下所示:
UIImage* pattern = [UIImage imageNamed:@"translucentPatternImage.png"];
view.backgroundColor = [UIColor colorWithPatternImage:pattern];
[view.layer setOpaque:NO];
view.opaque = NO;
Run Code Online (Sandbox Code Playgroud)
如果我没记错的话,您必须设置 TableViewCell 中标签的背景颜色。所以像,
[cell.textLabel setBackgroundColor:[UIColor clearColor]];
| 归档时间: |
|
| 查看次数: |
3707 次 |
| 最近记录: |