ios - Core Plot and Xcode 5 Compile Error: "Implicit conversion from enumeration type 'enum UILineBreakMode' -
i using xcode 5 , following error when trying compile ios app uses core plot:
implicit conversion enumeration type 'enum uilinebreakmode' different enumeration type 'nslinebreakmode' (aka 'enum nslinebreakmode')
the error in cpttextstyleplatformspecific.m
:
-(void)drawinrect:(cgrect)rect withtextstyle:(cpttextstyle *)style incontext:(cgcontextref)context { if ( style.color == nil ) { return; } cgcontextsavegstate(context); cgcolorref textcolor = style.color.cgcolor; cgcontextsetstrokecolorwithcolor(context, textcolor); cgcontextsetfillcolorwithcolor(context, textcolor); cptpushcgcontext(context); uifont *thefont = [uifont fontwithname:style.fontname size:style.fontsize]; [self drawinrect:rect withfont:thefont linebreakmode:**uilinebreakmodewordwrap** // error!! alignment:(nstextalignment)style.textalignment]; cgcontextrestoregstate(context); cptpopcgcontext(); }
how can fix error?
that should warning, unless you've turned on -werror
(not bad idea). regardless, if looked @ autocomplete "nslinebreak," error implies should, see nslinebreakbywordwrapping
.
Comments
Post a Comment