Chapter 12. Cover Flow
Chapter 5 introduced you to the Quartz Core framework and how to work with Core Animation to create stunning 3D transformations. It is the basis for Apple’s Cover Flow technology, which you’ll find in the iPhone’s iPod application when flipping through albums in landscape mode. Apple privatized its Cover Flow class so that it cannot be used with the SDK. This chapter will provide you with an SDK-compliant recipe to render a cover flow, but Apple could still reject your application if they believe it too closely copies the functionality of one of its own preloaded apps.
Layton Duncan of Polar Bear Farm, author of Search, Record, Telegram, and other popular AppStore applications, originally wrote code to illustrate an iPhone version of Apple’s CovertFlow example from the desktop Xcode examples. We’ve taken Layton’s original example, cleaned it up, and rewritten it to be compliant with the SDK’s sanctioned interfaces, so you can create stunning Cover Flow effects without using any private APIs.
Apple’s own Cover Flow class uses a private UI Kit object
named UICoverFlowLayer
to
render its content. This class is privatized, so we couldn’t use it to
create an SDK-compliant example (otherwise your application would break
the rules). As a result, the behavior of our example will be very close to
Apple’s own Cover Flow views, but may not be identical. A little
fine-tuning should get this example just where you like it for your
application.
CovertFlow: SDK Cover Flow Programming ...
Get iPhone SDK Application Development now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.