I am having a splitview application. Master pane is a UITableViewController and the detail view is web view. In the master pane on selecting an entry, another table view (created using one more tableviewcontroller to avoid complexity) appears and detail view shows some page related to the entry. This much is working fine.
Now I want the same with second table view as well i.e. on selecting an entry, the detail view should update accordingly. But its not getting updated.
I have made the following function in the first tableViewController class:
-(void) display:(NSString*)theUrl
{ NSLog(@"%@", theUrl);
NSURL *myUrl = [NSURL URLWithString:theUrl];
NSURLRequest *request = [NSURLRequest requestWithURL:myUrl];
splitViewDetailViewController *detailViewController =
self.detailViewController;
detailViewController.webView.scalesPageToFit = YES;
[detailViewController.webView loadRequest:request];
}
And I am calling this function from the secondTableViewController and its getting called but detail view isn’t getting updated. What should be the solution?
My guess is, viewing the available information, that self.detailViewController is not the detail view that you intended to update. It probably the detail view of the second tableView, right? You either need to pass on the reference of the detail view of the master table view to the second tableview or you may use custom delegate or notification to let the detail view update itself and send the URL info via the the delegate methods.