My first foray in Quartz and I'm having some problems, obviously missing something.
Given the following code in a subclass of UIButton: UIColor *baseColor = self.backgroundColor; CGColorRef cgColor = baseColor.CGColor; int32_t model = CGColorSpaceGetModel(CGColorGetColorSpace(cgColor)); const CGFloat *colorComponents = CGColorGetComponents(cgColor); float red = 0.0; float green = 0.0; float blue = 0.0; float alpha = 0.0; if (model == kCGColorSpaceModelRGB) { red = colorComponents[0]; green = colorComponents[1]; blue = colorComponents[2]; alpha = colorComponents[3]; } It doesn't matter which background color I choose for the button in Interface Builder, all the main 3 color components are always 1. Yes, I double-checked that I had a valid reference to my button, I just don't get it. Anybody sees what I'm doing wrong? -Laurent. -- Laurent Daudelin AIM/iChat/Skype:LaurentDaudelin http://www.nemesys-soft.com/ Logiciels Nemesys Software laur...@nemesys-soft.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