Re: Putting an image on a CALayer
Re: Putting an image on a CALayer
- Subject: Re: Putting an image on a CALayer
- From: DKJ <email@hidden>
- Date: Tue, 21 Oct 2008 13:00:47 -0700
OK, I tried this:
NSURL *url = [NSURL fileURLWithPath:fname];
CGImageSourceRef source = CGImageSourceCreateWithURL((CFURLRef)url,
NULL);
CGImageRef image = CGImageSourceCreateImageAtIndex(source, 0, NULL);
CFRelease(source);
theView.layer.contents = image;
and now I get an incompatible pointer type warning on the last line.
But the CALayer contents property has an id type.
And in any case, why is putting an image on a layer such an involved
process?
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden