On 7 Aug 2011, at 02:31, Graham Cox wrote:

> I think you need to set the resizing mask for the layer as well - since 
> you're creating this yourself, it's your responsibility:
> 
> zCALayerRoot.autoresizingMask = kCALayerWidthSizable | kCALayerHeightSizable;
> 
> If you want the layer to redraw its content when it resizes, you also have to 
> set:
> 
> zCALayerRoot.needsDisplayOnBoundsChange = YES;
> 
> but that's not necessary for the background host layer unless it has content 
> other than its background colour to draw.

Graham hi,
thanks for the suggestion.
Unfortunately I cannot get it to change the original behaviour.

- (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
        CALayer * zCALayerRoot = [CALayer layer];
        zCALayerRoot.autoresizingMask = kCALayerWidthSizable | 
kCALayerHeightSizable;
        zCALayerRoot.needsDisplayOnBoundsChange = YES;
        [self.myViewObj setLayer: zCALayerRoot];
        //zCALayerRoot.autoresizingMask = kCALayerWidthSizable | 
kCALayerHeightSizable;
        //zCALayerRoot.needsDisplayOnBoundsChange = YES;
        [self.myViewObj setWantsLayer:YES];
        self.myViewObj.layer.backgroundColor = 
CGColorCreateGenericRGB(0.0,0.0,0.0,1.0);
}

Julius


http://juliuspaintings.co.uk



_______________________________________________

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