Note that there are some explanatory texts on larger screens.

plurals
  1. POUIWebView won't load new URL
    primarykey
    data
    text
    <p>I have a UITableView that displays peoples names of whatever department is chosen. When you then select a person in the TableView, it loads a detail page with labels with all their contact info; then at the bottom it loads their website in a smaller UIWebView. </p> <p>If you choose a person, view their info, go back, then choose another person in that same department, the UIWebView does not reload the new selected person's website, it remains on the site of the person whom was first selected. </p> <p>I have tried all night to get this working; I am sure its something simple. </p> <p>I have tried setting the webView to nil, and releasing it in the viewDidDisappear and viewWillDisappear (the ones that get called when you go back to the list of people after viewing one).</p> <p>I have this set up as a UINavigationController.</p> <p>The labels for the selected person details all update for the selected person, but the UIWebView just doesn't want to reload. Any help appreciated!!</p> <p><strong>EDIT</strong> Sorry I forgot to add the code, it was way too late when I posted this lol. But here where all my labels and things get updated (I took those lines out to clean it up on here). </p> <pre><code>-(void)viewWillAppear:(BOOL)animated { NSLog(@"willAppear"); [[self navigationItem] setTitle:[selectedPerson professorLName]]; url = [[NSURL alloc] initWithString:[selectedPerson departmentWebsite]]; NSLog(@"%@", url); req = [[NSURLRequest alloc] initWithURL:url]; [webView loadRequest:req]; webView.scalesPageToFit = YES; } - (void)viewWillDisappear:(BOOL)animated { NSLog(@"willDis"); [super viewWillDisappear:animated]; [webView release]; webView = nil; url = nil; } - (void)viewDidDisappear:(BOOL)animated { NSLog(@"didDisappear"); [super viewDidDisappear:animated]; [webView release]; webView = nil; url = nil; } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload