UIView tree vs CALayer tree

Posts: 3
Joined: 2009.03
Post: #1
I'm curious, are there any advantages to using a tree of nested CALayers rather than a tree of nested UIViews for a straight boardgame with little animation? I noticed that Apple's GeekGameBoard sample uses nested CALayers and an open source library I've used in the past, Route Me, also relies on using CALayers directly. Just wondering what the typical scenarios are for choosing one method over the other.
Quote this message in a reply
Posts: 133
Joined: 2008.05
Post: #2
CALayers are just bitmaps that you can move around the screen. UIViews have more to them, being UIResponder subclasses. Speed and memory usage are two reasons to use CALayers over UIViews when you don't need an onscreen object to respond to events.
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  UIView opaque blending problems Joecoolage 0 4,760 Aug 2, 2010 12:58 AM
Last Post: Joecoolage
  UIView Subclass not displaying controls... flipflop 7 10,021 May 13, 2010 01:16 PM
Last Post: flipflop
  How to access EAGLView/UIView functions from C? Rasterman 10 10,028 Apr 8, 2010 10:47 AM
Last Post: Rasterman
  CALayer won't display Paul from Boston 1 4,536 Mar 26, 2010 09:08 AM
Last Post: longjumper
  CALayer drawLayer:inContext: dcavanagh 2 18,131 May 1, 2009 10:07 AM
Last Post: dcavanagh