I am creating a game in cocos2d but when i want to add uikit framework ,it doesn't seems in library of xcode. How can i add uikit framework in to my cocos2d project? I am using xcode 4.6.
Asked
Active
Viewed 1,447 times
1
-
How on earth did you manage to create an iOS project without UIKit? UIKit is the core of an iOS app. You can't have an app without UIKit. All iOS project templates have UIKit in them already. – Kreiri Sep 12 '13 at 22:19
-
In cocos2d with xcode 4.6 uikit is unavailable in framework group and it is also not found in library – Nies Sep 13 '13 at 05:18
-
I have Xcode 4.6.1. I've just created a brand new project with cocos2d template and UIKit most certainly **is** there in Frameworks group. – Kreiri Sep 13 '13 at 07:47
2 Answers
1
- In the project navigator, select your project
- Select your target
- Select the 'Build Phases' tab
- Open 'Link Binaries With Libraries' expander
- Click the '+' button
- Select your framework
- (optional) Drag and drop the added framework to the 'Frameworks' group
0
you can do it in following steps
1. <#import "UIKit/UIKit.h">
where you need uikit features
2.create you uibutton or view etc
3.lets suppose you want to create UIView Object in CCNode then instead of addChild use following line
[[[[CCDirector sharedDirector] openGLView] window] addSubview:];
thats all.

Sandeep Saurabh
- 83
- 1
- 8