This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Source: Apple Developer - Understanding iOS View Compositing | |
Note: setting view.layer.cornerRadius and .masksToBounds | |
sends the view for rending to an offscreen buffer. | |
We want to avoid unnecessary rendering passes. | |
Let the context do the work. | |
*/ | |
- (void)drawLayer:(CALayer *)layer inContext:(CGContextRef)ctx { | |
CGRect rect = layer.bounds; |
NewerOlder