cocos2d-objc
cocos2d-objc copied to clipboard
UIKit references in CCDirector.h
CCDirector inherits from from UIViewController on iOS. This causes a number of complications for x-platform and should be cleaned up. We should be able to remove the UIKit.h import at that time.
Sounds like a good idea. One thing to think about: What will be the recommended way of integrating UIKit elements in the future (e.g. presenting a UIViewController)? A bunch of frameworks, such as Game Center have a dependency on UIKit.
I'm not suggesting that we remove UIView references completely from Cocos. It should actually make it easier to integrate with larger UIKit applications since you can provide your own view controller for the Cocos view. At the iOS app delegate level, things would stay pretty much the same.
The problem that this is fixing is that the director and view have a different relationship on iOS that complicates a lot of things. There are a couple of issues that we've avoided fixing because of it.