Game Development Reference
In-Depth Information
The trickiest aspects were making the cocos2d view transparent in order to allow UIKit
views in the background as well as performing hit tests on cocos2d nodes in an attempt
to allow all views to receive input, whether UIKit or cocos2d and regardless of where
they are in the view hierarchy.
Adding cocos2d to a UIKit app also proved to be fairly simple, even if you need to turn
the cocos2d view on and off only at specific times. You may have also taken away that
the cocos2d view doesn't need to be full-screen at all but can be any size, or even res-
ized while the app is running.
But you also learned that mixing cocos2d and UIKit views is not without drawbacks,
specifically performance-wise. Keep a watchful eye on your app's performance by test-
ing it regularly on a device, particularly on first- and second-generation devices. You
only get the best performance if you avoid using UIKit views for your game scene, but
for menu scenes they can be a great help and timesaver.
Search Nedrilad ::




Custom Search