How do I get the last HTTP Status Code from a UIWebView?

后端 未结 9 2163
栀梦
栀梦 2020-12-08 16:43

I would like to detect when a page load request give to a UIWebView has returned a status code in the 5xx or 4xx range.

I\'ve setup the delegate for the web view a

9条回答
  •  悲哀的现实
    2020-12-08 17:20

    Sadly at present it looks like the best available option is to use -stringByEvaluatingJavaScriptFromString: to run some sort of small script that queries the document for its status code.

提交回复
热议问题