Skip to content

Instantly share code, notes, and snippets.

@wjlafrance
Created March 24, 2011 00:48
Show Gist options
  • Save wjlafrance/884355 to your computer and use it in GitHub Desktop.
Save wjlafrance/884355 to your computer and use it in GitHub Desktop.
// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
- (void)viewDidLoad
{
[super viewDidLoad];
CALayer *myLayer = [[CALayer alloc] init];
myLayer.position = CGPointMake(50, 50);
myLayer.backgroundColor = [[UIColor greenColor] CGColor];
myLayer.frame = CGRectMake(50, 50, 50, 50);
[[self.view layer] addSublayer:myLayer];
[myLayer release];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment