Yep. I realized after posting that .contents takes id.
_level1.contents = (id)CGImageCreateWithPNGDataProvider(provider,
NULL, true, kCGRenderingIntentDefault);
clears the warning
... maybe I should not code and drink beer on Sunday unless it is
Windows code.
On Feb 8, 2009, at 2:30 PM, Keary Suska wrote:
On Feb 8, 2009, at 1:54 PM, David Blanton wrote:
NSString* imageFileName = [[[NSBundle mainBundle] resourcePath]
stringByAppendingPathComponent:@"Level 1 top.png"];
CGDataProviderRef provider =
CGDataProviderCreateWithFilename([imageFileName UTF8String]);
_level1 = [[CALayer layer] retain];
_level1.contents = CGImageCreateWithPNGDataProvider(provider,
NULL, true, kCGRenderingIntentDefault);
CGImageCreateWithPNGDataProvider returns a CGImageRef yet the above
_level1.contents = gives the warning specified in the subject
line ....
can someone tell me why?
Well, CGImageRef is a pointer to struct, and contents takes an id.
Have you tried an explicit cast?
HTH,
Keary Suska
Esoteritech, Inc.
"Demystifying technology for your home or business"
_______________________________________________
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