当前位置: 动力学知识库 > 问答 > 编程问答 >

iphone - how do i wait for a webpage to finish loading everytime in uiwebview?

问题描述:

I have a number of links that are selected automatically using regex in a uiwebview. I am performing these steps in the viewdidfinishload method. How do I wait for the current view to finish loading everytime before selecting the next link? Do I need to use seperate webview objects or can I do all this in the same method. There will be several seperate links automatically selected. Any help would be greatly appreciated. Thank you.

网友答案:

below As Purva said Use web view delegate for load request or error handling and so on. You can show UIActivityIndicator while start load request and stop it when request loaded successfully.

– webView:shouldStartLoadWithRequest:navigationType:

– webViewDidStartLoad:

– webViewDidFinishLoad:

– webView:didFailLoadWithError:

分享给朋友:
您可能感兴趣的文章:
随机阅读: