I have a UIWebView that I am loading with a string full of HTML. There are times when I am paging through the content quickly, and when the app catches up, the UIWebView loads the HTML and it just pops up there.
I want to somehow make it a little more visually appealing. Is there a way to subtly fade into the content of the webView? Make it a little less shocking?
Thanks!
You could set the webview’s
.alphavalue to0, and animate it to1when the webpage is done loading.To determine if the webpage is loaded and rendered, either use the webview delegate methods, or add a piece of javascript to the page (if possible) to explicitly call back when the page load is finished. You can simply do
<script language=javascript>window.location="done:";</script>and catch the load of thisdone:url in you webview delegate method (-webview:shouldStartLoadWithRequest:)