尝试转换SpriteBuilder创建的项目时,Apportable构建错误

时间:2013-11-25 23:39:42

标签: cocos2d-iphone apportable

我在SpriteBuilder中创建了一个新项目,并尝试使用Apportable将其转换为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
  • Apportable release_1.0.30
  • SpriteBuilder 0.9.alpha。

1 个答案:

答案 0 :(得分:0)

当前版本的Apportable并不完全支持NSAttributedString。这将在我们的新UIKit实现中提供,我们将在其完成后立即发布。