tags:

views:

32

answers:

1

Solution note, not a question.

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. 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.

iOS SDK 4.1

A: 

Genius... man I've been searching for this for hours.

Ben