Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does selecting CALayer in View Effects Inspector inside Interface Builder do?

Inside IB, in View Effects Inspector, there is an option to set Core Animation Layer. If I set it what does it do?

View Effects Inspector

Is it equivalent to setWantsLayer:YES?

If so then as per Apple docs setWantsLayer can be called before or after setLayer:.

The order that setWantsLayer: and setLayer: are called is important, it makes the distinction between a layer-backed view and a layer-hosting view.

If I set CALayer from IB, which order would it be?

like image 560
Andrew-Dufresne Avatar asked Apr 23 '12 09:04

Andrew-Dufresne


1 Answers

The checkbox makes your view layer-backed (like calling setWantsLayer: without setLayer:).

like image 196
omz Avatar answered Sep 20 '22 01:09

omz