Graphics Reference
In-Depth Information
generated again for our use. This means that tiles appear in an asynchronous manner as
they are generated for us, and users see a delay as the tiles are generated and drawn in the
layer. A great demonstration of this effect is the Google Maps application on iPhone, as
shown in Figure 12-5. If you zoom out or zoom into a different level of tiles, the images
that are not yet available display as a simple gray grid. As the tiles are loaded, they replace
this grid with the actual information.
FIGURE 12-5
Google Maps Application on the iPhone
Multithreaded Animation
Core Animation is internally thread safe because it was designed with multicore systems
in mind.
NOTE
What this means in practical terms is
that you can manipulate Core
Animation layers on multiple threads
without risk of corrupting its data inter-
nally and, equally important, that it
does the right thing. However, the one
area of Core Animation that is not
necessarily thread safe is when it comes
to accessing properties of a CALayer .
What Is a Lock?
A lock is when one object grabs the “access
flag” to another object. Only a single object
can have that access flag at a time when
locks are engaged. Any subsequent object
must wait until the flag is available before it
can proceed to access the affected object.
 
Search WWH ::




Custom Search