I think that adding a CALayer as "subview", somehow, does save a lot of memory. A UIView always comes with 3 copies of it's content bitmap (presentation layer, render tree and another one, plus the view itself, so every pixel is saved 4 times). But how could that be done?
Iphone – How to add a naked CALayer as “subview” to a UIView
cocoa-touchiphoneuikit
Related Topic
- Ios – How to lose margin/padding in UITextView
- Ios – How to sort an NSMutableArray with custom objects in it
- Iphone – Possible to copy CALayer from UIView
- Ios – How to check for an active Internet connection on iOS or macOS
- Ios – Giving UIView rounded corners
- Iphone – Is it possible to display an CALayer without an UIView
Best Answer
UIView is basically a wrapper for CALayer. So you can add a layer directly to the view's layer. This can be done by calling