Game Development Reference
In-Depth Information
Cocoa Touch is comprised of several frameworks, including Core Animation, Core
Data, Map Kit, Store Kit, and Web Kit, just to name a few. But strictly speaking, even
cocos2d is a Cocoa Touch library because the OpenGL ES framework, as well as Core
Audio, OpenAL, and AV Foundation (AV stands for Audio/Video) frameworks that
cocos2d is built on, are part of Cocoa Touch.
It's no wonder then that most programmers refer specifically to UIKit when they're
asking about how to integrate Cocoa Touch views into cocos2d. UIKit is the frame-
work that provides programmers with the native iOS controls and views used to build
the graphical user interfaces (GUIs) of iOS applications. At the same time, other frame-
works such as iAd, Web Kit, Game Kit, and Map Kit typically include specialized
views, and they're mostly built with the GUI elements provided by UIKit.
So, technically, even if programmers discuss integration issues of Game Center with
cocos2d, they often refer to the views as being part of UIKit, even though the actual
view is provided by Game Kit or Web Kit, for example. For reference, here are the
cocos2d forum topics tagged with UIKit and Cocoa Touch:
http://www.cocos2d-iphone.org/forum/tags/uikit
http://www.cocos2d-iphone.org/forum/tags/cocoa-touch
Using Cocoa Touch and cocos2d Together
Before you get to work with the code in this chapter, I want to step back for a moment
and discuss why one would want to mix cocos2d with Cocoa Touch (UIKit views),
what the limitations are, and what the differences between Cocoa Touch and cocos2d
are.
Why Mix Cocoa Touch with cocos2d?
There are many good reasons to mix Cocoa Touch and cocos2d. Essentially, they all
boil down to a better user experience or faster development.
For one, if you're a cocos2d programmer, you'll be adding some Cocoa Touch views to
your application sooner or later, most commonly to generate some revenue with iAd or
if you're writing a Game Center-enabled game. But you also might want to provide
Search Nedrilad ::




Custom Search