iphone - UIWebView loading -
i want load html data in webview. @ button click, open viewcontroller , load html data in viewcontroller (add web view in view controller using interface builder). when html data not proper loading , press button, @ time crash app. not doing allocation & init webview in coding. set iboutlet using interface builder & bind it.
- (void)connectiondidfinishloading:(nsurlconnection *)connection { [connection release]; nsstring *strresponce = [[nsstring alloc] initwithdata:jsondata_info encoding:nsutf8stringencoding]; [jsondata_info release]; nserror *error; sbjson *json = [[sbjson new] autorelease]; self.jsonarray_info=[json objectwithstring:strresponce error:&error]; str_infodetail = [[self.jsonarray_info objectatindex:0] valueforkey:@"page"]; str_html = [nsstring stringwithformat:@"%@",str_infodetail]; nsstring *temp; temp = [nsstring stringwithformat:@"<html><head><style>body{background-color:transparent;}</style></head><body><span style='color:white'>%@</span></body></html>",str_html]; //web_information = [[uiwebview alloc]init]; web_information.backgroundcolor=[uicolor clearcolor]; web_information.opaque= no; [web_information loadhtmlstring:temp baseurl:nil]; [act stopanimating]; [strresponce release]; } please give me solution.
thanks.
do steps mentioned in link , see if crashes:
Comments
Post a Comment