Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get Progress of UIWebView

Is there a way to get the percentage of the page loaded from a UIWebViewin Swift with from a standard @IBOutlet?

@IBOutlet var webView: UIWebView!;
like image 956
Jake Chasan Avatar asked May 26 '15 00:05

Jake Chasan


1 Answers

Not with a UIWebView, no; it isn't possible.

But, new in iOS 8, you can use WKWebView, which has an estimatedProgress property which you can observe using key-value observing and thus get updates as the progress of loading proceeds.

like image 144
matt Avatar answered Oct 16 '22 16:10

matt