문제

I created a New Project in SpriteBuilder and am trying to convert it to Android using Apportable.

When I run $ apportable build I am now getting many error: use of undeclared identifier errors related to CCLabelTTF.m. Here are three of them as examples:

/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])
                                            ^

Any suggestions how to proceed?

I'm using

  • Xcode 5.0.2
  • Apportable release_1.0.30
  • SpriteBuilder 0.9.alpha.
도움이 되었습니까?

해결책

The current version of Apportable does not have full support for NSAttributedString. That will be available in our new UIKit implementation, which we will release as soon as it is sufficiently complete.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top