Is the -loadHTMLString:baseURL:
method of UIWebView meant to only be called once per instance?
Here's my logic flow:
1. View loads & supplies UIWebView placeholder text via -loadHTMLString:baseURL: 2. NSURLConnection requests a URL asynchronously 3. Upon NSURLConnection finished, replace UIWebView content with loaded data via -loadHTMLString:baseURL:
Debugging shows that loadHTMLString:baseURL:
is being called and the string being passed in is correct, but the UIWebView isn't updated. I even tried calling [webViewInstance setNeedsDisplay] thinking a redraw would fix it, but no dice.
In Apple Developer docs, it says nothing about the method being one-call-per-instance, but based on its behavior, this is what it seems like. Anyone else run into this?
There's no limit on the number of times loadHTMLString: can be called. I call it hundreds of times on the same UIWebView in my app.
Did you implement webView:shouldStartLoadWithRequest:navigationType: ? If you did, make sure you return YES.