I used this code to set background as a pattern image:
UIImage *bg = SomeImage();
UIColor *bgc = [UIColor colorWithPatternImage:bg];
[self setBackgroundColor:bgc];
[self setOpaque:NO];
This works, but alpha blending doesn't work. Might be a bug. How to make it work?
iOS SDK 4.1
This code make it alpha blended on both of simulator and device.
UIImage *bg = SomeImage();
UIColor *bgc = [UIColor colorWithPatternImage:bg];
[self setBackgroundColor:bgc];
[self setOpaque:NO];
[[self layer] setOpaque:NO]; // Added this line.
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