ios UILabel setFrame error -


#import <quartzcore/quartzcore.h> - (void)viewdidload {     [self.forwardview setframe:cgrectmake(12.0, 40.0+height, 296.0, rootviewheight-15.0)];      self.forwardview.layer.bordercolor = [uicolor colorwithred:153.0/250.0 green:153.0/250.0 blue:153.0/250.0 alpha:100].cgcolor;     self.forwardview.layer.borderwidth = 1;     cgrect frame = cgrectmake(12.0f, 40.0f, 288.0f , height);     [self.tvcontent setframe:frame]; }   [self.tvcontent setframe:frame]; //crash? 

exception message:

-[__nscfstring setframe:]: unrecognized selector sent instance 0x7894c00 2013-05-21 10:44:54.677 sohappy[22295:c07] *** terminating app due uncaught exception 'nsinvalidargumentexception', reason: '-[__nscfstring setframe:]: unrecognized selector sent instance 0x7894c00' *** first throw call stack: (0x1eb5012 0x19aae7e 0x1f404bd 0x1ea4bbc 0x1ea494e 0xfb407 0xfc20b 0x9d01c7 0x9d0232 0x9d04da 0x9e78e5 0x9e79cb 0x9e7c76 0x9e7d71 0x9e889b 0x9e8e93 0x8ef13f7 0x9e8a88 0x93b9 0x99df83 0x99e4ed 0x13a85b3 0x1e74376 0x1e73e06 0x1e5ba82 0x1e5af44 0x1e5ae1b 0x24e27e3 0x24e2668 0x8eeffc 0x2acd 0x29f5 0x1) libc++abi.dylib: terminate called throwing exception 

uilabel in .xib , useautolayout, ios sdk 6.1

you trying set frame of nsstring - doesn't exist. self.tvcontent nsstring, not uilabel seem have suspected.


this chance learn how read exceptions. i'll break down here:

-[__nscfstring setframe:]: unrecognized selector sent instance 0x7894c00 2013-05-21 10:44:54.677 sohappy[22295:c07] *** terminating app due uncaught exception 'nsinvalidargumentexception', reason: '-[__nscfstring setframe:]: unrecognized selector sent instance 0x7894c00' *** first throw call stack: (0x1eb5012 0x19aae7e 0x1f404bd 0x1ea4bbc 0x1ea494e 0xfb407 0xfc20b 0x9d01c7 0x9d0232 0x9d04da 0x9e78e5 0x9e79cb 0x9e7c76 0x9e7d71 0x9e889b 0x9e8e93 0x8ef13f7 0x9e8a88 0x93b9 0x99df83 0x99e4ed 0x13a85b3 0x1e74376 0x1e73e06 0x1e5ba82 0x1e5af44 0x1e5ae1b 0x24e27e3 0x24e2668 0x8eeffc 0x2acd 0x29f5 0x1) libc++abi.dylib: terminate called throwing exception 

here's interested in:

-[__nscfstring setframe:]: unrecognized selector sent instance 0x7894c00 

the system giving class of object , message tried send - in case nsstring tried call setframe: on.

this information coupled know line crashing makes easy conclusion: self.tvcontent nsstring expecting uilabel.


Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -