Reputation: 862
I'm using XCode 4.5.2 to create an iOS universal application.
I'd like to use its storyboard for my application. Normally, I create new project by choosing New > Project > Single view project > check Use storyboard.
Sometimes in my application, I need to use Cocos2D for complex animation (no need to interactive with it, only for presentation).
My animation was created using CocosBuilder which works with Cocos2D 2.0 and CCBReader library.
I tried to add Cocos2D to my existing project by:
But when I build project, the ARC errors are still there.
#Question:
I successfully created an project with Cocos2D inside a UIView from a Cocos2D template as Ray's post but now I want things (may be) a little more complicated.
Upvotes: 4
Views: 2124
Reputation: 862
With many help from @Setrio, @LearnCocos2D and lot of Googling, I finally fixed it.
My project is combined from Cocos2D, Storyboard, ARC enabled and CocosBuilder.
First, create a project with SingleView selection (ARC enabled of course).
Then download the Cocos2D ARC enabled here https://github.com/LearnCocos2D/cocos2d-iphone-arc-templates thanks to Steffen!
Add its libs into your project as pointed out here http://www.learn-cocos2d.com/2012/04/enable-arc-cocos2d-project-video-tutorial/ (brilliant, works like charm)
Create storyboard with Cocos2D as this tutorial (sample included) http://www.tinytimgames.com/2012/02/07/cocos2d-and-storyboards/
All things work together now. Beautiful. I love Cocos2D :)
Upvotes: 5
Reputation: 1408
I found this link/tutorial useful for a project similar to this one.
http://www.tinytimgames.com/2012/02/07/cocos2d-and-storyboards/
Basically you add support for cocos2d inside the view controllers. You have to use cocos2d as a library and that solves most of the issues.
Upvotes: 1
Reputation: 536
Upvotes: 1