Skip to content

Instantly share code, notes, and snippets.

/*
Source: Apple Developer - Understanding iOS View Compositing
*/
- (void)drawLayer:(CALayer *)layer inContext:(CGContextRef)ctx {
UIImage *image = [self loadImage];
if (image != nil) {
CGSize s = image.size;
CGRect r = layer.bounds;