我在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])
^
有任何建议如何进行?
我正在使用
答案 0 :(得分:0)
当前版本的Apportable并不完全支持NSAttributedString。这将在我们的新UIKit实现中提供,我们将在其完成后立即发布。