I have troubles with setting my patterned UIColor
. In iOS 5 it's all good, but in iOS 4.3 I get the issue. I added an image for better understanding. I already Googled a bit, and found that the answer is possibly the setting of the opaque
property to NO
. But I already set every view
, contentView
, backgroundView
, tableViewCell
it's opaque
value to NO
.
You can see that the separator color is black, where the image has of the pattern has transparency
This appears to be a bug in iOS 4.3 that they fixed in 5.0 .
To get this to work on 4.3, you'll need to set both the view and the layer to non-opaque, after setting the view's backgroundColor to the pattern image, like so:
UIImage* pattern = [UIImage imageNamed:@"translucentPatternImage.png"];
view.backgroundColor = [UIColor colorWithPatternImage:pattern];
[view.layer setOpaque:NO];
view.opaque = NO;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With