What does: IKImageView setOverlay method ?
What does: IKImageView setOverlay method ?
- Subject: What does: IKImageView setOverlay method ?
- From: Peter Krajčík <email@hidden>
- Date: Thu, 4 Nov 2010 18:07:10 +0100
Hello,
could anybody explain what is this method:
/*!
@method setOverlay:forType:
@abstract Sets an overlay (Core Animation layer) for the image or the image background.
*/
- (void)setOverlay: (CALayer *)layer forType: (NSString *)layerType;
I tried to use it in IKIMageViewDemo this way:
CALayer *rootLayer=[CALayer layer];
NSImage *theImage=[[NSImage alloc] initWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"back" ofType:@"png"]];
rootLayer.contents=theImage;
rootLayer.contentsGravity=kCAGravityTop;
[theImage release];
[_imageView setOverlay: rootLayer forType: IKOverlayTypeBackground];
I suppose, that background of IKImageView will be overlayed with back.png I set to rootLayer and IKImageView image will be overlayed on it.
back.png is still on top of IKImageView image and I can't use IKImageView tools.
Thank you.
Peter_______________________________________________
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