title: Core Animation -- Nothing Appears (OS X)
body: <p>I am attempting to draw this plane with Core Animation <em>in OS X</em>:</p>
  
  <p><img src="https://i.stack.imgur.com/LXuRY.png" alt="enter image description here"></p>
  
  <p>(without the black background, however).</p>
  
  <p>This is the code in my custom NSView:</p>
  
  <pre><code>- (id)initWithFrame:(NSRect)frame
  {
    self = [super initWithFrame:frame];
    if (self) {
      [self A_singlePlane];
    }
    return self;
  }
  
  - (void)A_singlePlane{
    CALayer *container = [CALayer layer];
    container.frame = CGRectMake(0, 0, self.frame.size.width, self.frame.size.height);
    [self.layer addSublayer:container];
  
    CALayer *purpleLayer = [self addPlaneToLayer:container size:CGSizeMake(100, 100)   position:CGPointMake(100, 100) color:[NSColor purpleColor]];
  
    CATransform3D t = CATransform3DIdentity;
    t = CATransform3DRotate(t, 45.0f * M_PI / 180.f, 0, 1, 0);
    purpleLayer.transform = t;
  }
  
  - (CALayer *)addPlaneToLayer:(CALayer* )container size:(CGSize)size position:(CGPoint)point color:(NSColor *)color{
  
    CALayer *plane = [CALayer layer];
  
    plane.backgroundColor = [color CGColor];
    plane.opacity = 0.6;
    plane.frame = CGRectMake(point.x, point.y, size.width, size.height);
    plane.borderColor = [[NSColor colorWithWhite:1.0 alpha:0.5] CGColor];
    plane.borderWidth = 3.0;
    plane.cornerRadius = 10.0;
    [container addSublayer:plane];
  
    return plane;
  }
  </code></pre>
  
  <p>I have a view in interface builder with the class set as my custom NSView class. My custom view is set to have a layer. The result is a blank NSWindow. I do not receive any errors or warnings.</p>
  
  <p>Does anyone see where my logical flaw is?</p>