I have a CALayer subclass, set to redraw on bounds change, with the following draw code (I don't expect it to be meaningful, but I'm pasting it here for the sake of completeness.)

- (void)drawInContext:(CGContextRef)ctx
{
        CGRect bounds = CGContextGetClipBoundingBox(ctx);
CGContextDrawImage(ctx, CGRectMake(0,0,18, bounds.size.height-18),sideImage); CGContextDrawImage(ctx, CGRectMake(0,bounds.size.height-18,18, 18),cornerImage); CGContextDrawImage(ctx, CGRectMake(18,bounds.size.height-18,bounds.size.width-36,18),topImage);
        CGContextScaleCTM (ctx, -1.0, 1.0);
        CGContextTranslateCTM ( ctx, -bounds.size.width, 0.0);
CGContextDrawImage(ctx, CGRectMake(0.0,bounds.size.height-18,18,18),cornerImage); CGContextDrawImage(ctx, CGRectMake(0.0,0.0,18,bounds.size.height-18),sideImage);
}

It's parent view is set up to change the layers frame to always fill the contents of the entire view on resizeWithOldSuperviewSize:. This works great, except for a really annoying flicker that occurs once every few seconds while the view is resizing. Every layer in the view flickers in and out (stuff like background colors doesn't flicker).

Did I miss some drawing cleanup or something else obvious here?

(I've tried doing this automatically with constraint managers, same problem...)
_______________________________________________

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 [EMAIL PROTECTED]

Reply via email to