I’m parsing a json object and populating it in table view.
When the table view row is selected it navigates to a detailed view controller named as “ThirdDetailView” and was able to assign the parsed data in my ThirdDetailView (using web view).
Problem arises when my ThirdDetailView is one of the view in my four tab bars .I have placed those four tabbar in a view called firstView, So that clicking on the tableview navigates to firstView containing four tabbars showing the ThirdDetailView as highlighted as the first tab.if this is the case data is not getting loaded in the web view.
below is the code:
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
title=[story objectAtIndex:indexPath.row];
NSDictionary *detaildesc1=[media1 objectAtIndex:indexPath.row];
ThirdDetailView *detailViewController1= [[ThirdDetailView alloc]init];
[detailViewController1 initWithItem:detaildesc1 Title:title];
FirstView *dvController4 = [[FirstView alloc] initWithNibName:@"FirstView" bundle:[NSBundle mainBundle]];
[self.navigationController pushViewController:dvController4 animated:YES];
[dvController4 release];
[detailViewController1 release];
}
}
ThirdDetailView
@synthesize theItem1,theTitle,img,body,message,facebook,webview,id1;
- (id)initWithItem:(NSDictionary *)detaildesc1 Title:(NSString *)title
{
if (self = [super initWithNibName:@"ThirdDetailView" bundle:nil]) {
self.id1=detaildesc1;
self.theTitle=title;
urlAddress = [NSString stringWithFormat:@"http://dev-parkguiden.knutpunkten.se/Api/GetPark?parkid=%@",self.id1];
baseURL =[[NSURL URLWithString:urlAddress]retain];
jsonData=[NSData dataWithContentsOfURL:baseURL];
// self.title=title;
NSDictionary *items=[NSJSONSerialization JSONObjectWithData:jsonData options:NSJSONReadingMutableLeaves error:nil];
boom=[items objectForKey:@"description"];
NSLog(@"what is the text:%@",[items objectForKey:@"description"]);
[self.webview loadHTMLString:boom baseURL:nil];
}
return self;
}

FirstView Tabbar

Try Out this
I have tested in my app in perfectly show your text in webview