A layer backed view contains Cocoa or Cocoa Touch UI controls and can be animated using the animator proxy. Layer backed views allow you to animate your UI and help to reduce the overhead of drawing by caching the views contents on a core animation layer. Create a Layer backed view by setting the wants layer property:
NSView *layerBacked = [NSView new];
[layerBacked setWantsLayer:YES];
A layer hosting view provides a layer for direct manipulation hosted by an NSView or UIView. Layer hosting views can be used for embedding core animation drawing and animation anywhere you can put an NSView:
NSView *layerHosting = [NSView new];
[layerHosting setLayer:[[CALayer new] autorelease]];
[layerHosting setWantsLayer:YES];
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…