iphone - Program received signal: "EXC_BAD_ACCESS" while adding subview to main view -
i adding 2 labels , 2 image view subview.
when ever tap on button add subview mainview.
i getting images web server , save in local simulator documents.
nsmutablestring *about_name_str = [[nsmutablestring alloc]init]; [about_name_str appendstring:[mydictionary objectforkey:@"firstname"]]; [about_name_str appendstring:@" "]; [about_name_str appendstring:[mydictionary objectforkey:@"lastname"]]; [about_name_label settext:about_name_str]; nsmutablestring *about_addr_str = [[nsmutablestring alloc]init]; [about_addr_str appendstring:[mydictionary objectforkey:@"state"]]; [about_addr_str appendstring:@","]; [about_addr_str appendstring:[mydictionary objectforkey:@"country"]]; [about_addr_label settext:about_addr_str]; about_image.image = [uiimage imagewithcontentsoffile:imagepath]; about_logo.image = [uiimage imagewithcontentsoffile:logopath]; if ([mydictionary objectforkey:@"companyurl"]) { [about_url_button settitle:[mydictionary objectforkey:@"companyurl"] forstate:uicontrolstatenormal]; about_url_button.userinteractionenabled = yes; } else { about_url_button.userinteractionenabled = no; } [self.view addsubview:about_view];
this code.
some times got program received signal: "exc_bad_access".
, application quits.
i check placing break points,and in debugger did n't getting error.
can 1 please me,how can resolve this.
thank u in advance.
try use nszombie.. easy way find excbadaccess occurs... specify method , object gets deallocated(its pretty awesome concept in instruments)...
Comments
Post a Comment