0

我在 SpriteBuilder 中创建了一个新项目,并尝试使用 Apportable 将其转换为 Android。

当我运行$ apportable build时,我现在收到许多error: use of undeclared identifier与 CCLabelTTF.m 相关的错误。以下是其中三个作为示例:

/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
  • 合适的release_1.0.30
  • SpriteBuilder 0.9.alpha。
4

1 回答 1

0

当前版本的 Apportable 不完全支持 NSAttributedString。这将在我们新的 UIKit 实现中可用,一旦它足够完整,我们将立即发布。

于 2013-11-26T07:47:45.747 回答