Scheduled for release on November 7th, 2011. Continue reading »
Everyone knows how to add a UIView to an iOS app built with cocos2d-iphone. It’s straightforward, just create the view and then call:
|
1 |
[[CCDirector sharedDirector].view addSubview:theView]; |
There. Now suppose you want to do the same on Mac OS X. HA! HA! Hawww!
Cocoa’s laughing at your feeble attempts. It’s really just Cocoa’s fault though. Having done a fair amount of work with both SDKs, the Cocoa on OS X just feels … old. Backwards. Confuscated. No, not confusing, literally confuscated – it can’t even spell confusing like everyone else does.
But … there is always a way. On OS X it’s just more often than on iOS a matter of finding the right way. It can be done. Here’s proof:
The trick here is to create an additional “overlay” NSWindow that’ll hold all of your views. Actually, it’s not the overlay window it’s the overlay window’s content view, which is just an empty NSView. But first things first, step by step. Continue reading »
Scheduled for release on November 7th, 2011. Continue reading »
Please help me improve KoboldTouch: fill out the KoboldTouch Survey and let me know what you think of it.
Thank you!
I'm Steffen Itterheim, author of Learn Cocos2D and iOS game developer.
I spend my time working for the Cocos2D and Kobold2D community.
Kobold2D is a beginner-friendly version of Cocos2D for iOS & Mac. To help support its development I would appreciate it if you consider purchasing the products I offer.
Cocos2D Podcast (iTunes)
Game development framework with scalable MVC architecture built on cocos2d-iphone and Box2D, 100% Objective-C and ARC, with the features you need! Learn more!
Rapidly create your own RPG or action-adventure game with this complete starter kit. Includes an ebook, game source code and a royalty-free art package.

More Affiliate Products …
