objective c - Error: "-[NSCFString sizeWithTextStyle:]: unrecognized selector" in IPhone SDK -


i following error while running app.

'-[nscfstring sizewithtextstyle:]: unrecognized selector

i have not used sizewithtextstyle in entire project.

so wrong?

i error on return pos; statement below

code:

(uiview *)tableview:(uitableview *)tableview viewforheaderinsection:(nsinteger)section {      uiview *pos = [[uiview alloc] initwithframe:cgrectmake(0.0,0.0,320.0,35.0)];      return pos; } 

error in console:

terminating app due uncaught exception 'nsinvalidargumentexception', reason: '-[nscfstring sizewithtextstyle:]: unrecognized selector sent instance 0x7044b50'

because of indentation problem while putting whole crash log here, putting screenshot of crash log

enter image description here

i think, problem somewhere else, not in line of code. object not able retain itself. post code, using sizewithtextstyle method

have -all_load flag on link settings?

this issue comes lot. you need add -all_load , -objc applications link flags.

*edit : *

crash appears occur on line:

 cgsize textsize = [self.text sizewithtextstyle:textstyle];  in class: cptextlayer method: sizetofit   called within class cptextlayer method initwithtext: -(id)initwithtext:(nsstring *)newtext style:(cptextstyle *)newstyle .... [self sizetofit];   **try set ios 4 , not 3.1.3 ** 

Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -