Skip to content

Instantly share code, notes, and snippets.

@valexa
Created January 28, 2013 04:56
Show Gist options
  • Save valexa/4653170 to your computer and use it in GitHub Desktop.
Save valexa/4653170 to your computer and use it in GitHub Desktop.
NSView *parent = [[NSView alloc] initWithFrame:NSZeroRect];
NSView *child = [[NSView alloc] initWithFrame:NSZeroRect];
[parent addSubview:child];
[child setWantsLayer:YES];
CALayer *childLayer = [child layer];
CATransformLayer *transformLayer = [CATransformLayer layer];
[transformLayer addSublayer:childLayer];
[parent setWantsLayer:YES];
NSLog(@"%@",childLayer);
NSLog(@"%@",transformLayer.sublayers);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment