UIView tree vs CALayer tree

Nibbie
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
Moderator
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 3,629 Aug 2, 2010 12:58 AM
Last Post: Joecoolage
  UIView Subclass not displaying controls... flipflop 7 6,823 May 13, 2010 01:16 PM
Last Post: flipflop
  How to access EAGLView/UIView functions from C? Rasterman 10 5,887 Apr 8, 2010 10:47 AM
Last Post: Rasterman
  CALayer won't display Paul from Boston 1 3,255 Mar 26, 2010 09:08 AM
Last Post: longjumper
  CALayer drawLayer:inContext: dcavanagh 2 11,830 May 1, 2009 10:07 AM
Last Post: dcavanagh