Hey everyone,

I'm having trouble getting a png with transparency to show up properly as a
background image.  Right now it *looks* like the transparent area is coming
over as black.  Here's the relevant code:

self.selectedBackground = [UIImage imageNamed:@"selected-group.png"];
self.backgroundColor = [UIColor
colorWithPatternImage:self.selectedBackground];

Nothing in the docs seems to indicate that I should be doing anything
differently to force support for transparent PNGs, but I also noticed that
whenever I add a UIImageView in IB, it defaults to "Opaque" as checked which
I have to un-check to support the transparency in my PNG files.  Is there a
programatic equivalent to unchecking that box on a UIImage or UIColor?

Also it might be worth noting that the UIView this code is being applied to
has "Opaque" unchecked in IB, in case that makes any difference.

Thanks for any help!

-
Matt James
http://www.macyenta.com
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to