我在SpriteBuilder中创建了一个新项目,并试图使用Apportal将其转换为Android。
当我运行$ apportable build
时,我现在得到了许多与CCLabelTTF.m相关的error: use of undeclared identifier
错误。以下是其中三个示例:
/Users/name/Documents/TestApp/Source/libs/cocos2d-iphone/cocos2d/CCLabelTTF.m:350:50: error: use of undeclared
identifier 'NSForegroundColorAttributeName'; did you mean 'kCTForegroundColorAttributeName'?
if (![formattedAttributedString hasAttribute:NSForegroundColorAttributeName])
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
kCTForegroundColorAttributeName
/Users/name/Documents/TestApp/Source/libs/cocos2d-iphone/cocos2d/CCLabelTTF.m:372:50: error: use of undeclared
identifier 'NSFontAttributeName'; did you mean 'kCTFontAttributeName'?
if (![formattedAttributedString hasAttribute:NSFontAttributeName])
^~~~~~~~~~~~~~~~~~~
kCTFontAttributeName
Compiling /Users/name/Documents/TestApp/Source/libs/cocos2d-iphone/cocos2d/CCParticleSystem.m
/Users/name/Documents/TestApp/Source/libs/cocos2d-iphone/cocos2d/CCLabelTTF.m:380:49: error: use of undeclared
identifier 'NSShadowAttributeName'
if ([formattedAttributedString hasAttribute:NSShadowAttributeName])
^
有什么建议吗?
我正在使用
- Xcode 5.0.2
- 可移植版本1.0.30
- SpriteBuilder 0.9阿尔法
当前版本的Apportal不完全支持NSAttributedString。这将在我们新的UIKit实现中提供,一旦它足够完整,我们就会发布。