Quantcast
Channel: cocos2d-x - Cocos Forums
Viewing all articles
Browse latest Browse all 2748

Some mistake about cocos2d-x 3.12 in xcode build plz help

$
0
0

@hansiyuan wrote:

hello everyone:
i have some problem in this version for cocos2d-x 3.12
i download this version in my mac os . my os ver is 10.10.5 and my xcode ver is 5.1.1.
today i setup this in that. and i create the helloword demo in bash to the desktop. but when i build it in xcode,there have one mistake about:
/Users/it/Desktop/HelloWorldDemo/cocos2d/cocos/platform/ios/CCDevice-ios.mm:348:42: Cannot initialize a parameter of type 'NSStringDrawingOptions' with an rvalue of type 'int'

this is have mistake code:
static CGSize _calculateStringSize(NSAttributedString *str, id font, CGSize *constrainSize, bool enableWrap, int overflow)
{
CGSize textRect = CGSizeZero;
textRect.width = constrainSize->width > 0 ? constrainSize->width
: CGFLOAT_MAX;
textRect.height = constrainSize->height > 0 ? constrainSize->height
: CGFLOAT_MAX;

if (overflow == 1) {
if(!enableWrap) {
textRect.width = CGFLOAT_MAX;
textRect.height = CGFLOAT_MAX;
} else {
textRect.height = CGFLOAT_MAX;
}
}

CGSize dim;
dim = [str boundingRectWithSize:CGSizeMake(textRect.width, textRect.height)
options:(NSStringDrawingUsesLineFragmentOrigin|NSStringDrawingUsesFontLeading)
context:nil].size;

dim.width = ceilf(dim.width);
dim.height = ceilf(dim.height);

return dim;
i really cant konw what is it .plz help me ,,

Posts: 7

Participants: 3

Read full topic


Viewing all articles
Browse latest Browse all 2748

Latest Images

Trending Articles



Latest Images