UIwebView顶部进度条怎么实现的?有现成的开源库吗?
目前用的是SVProgressHUD ,他好像只能在屏幕中间显示一个圈圈。。
PHP中文网2017-04-18 09:34:50
The system has a progress bar control UIProgressView. It is also very simple to customize a view yourself.
Those progress bars on WeChat are all fake, not real progress. If you turn off the gateway, it will still reach 80~90%
迷茫2017-04-18 09:34:50
WKWebView has estimatedProgress attribute
UIWebView does not but can use NJKWebViewProgress, of course WK can also use NJK
I wrote a base class myself, use wk for ios8 and above, otherwise UI, github address https://github.com/yuqingzhud...
You should be able to find what you want
黄舟2017-04-18 09:34:50
SVProgressHUD, it just shows whether loading is complete.
Use this NJKWebViewProgress. There is an address in it
PHP中文网2017-04-18 09:34:50
https://github.com/ninjinkun/...
If compatibility with iOS7 is not considered, then KVO operation on the estimatedProgress attribute of WKWebview can also monitor the progress
[wkWebView addObserver:self forKeyPath:@"estimatedProgress" options:NSKeyValueObservingOptionNew context:nil];
巴扎黑2017-04-18 09:34:50
UIWebview does not support progress bar, iOS 8 or above can use WkWebview
巴扎黑2017-04-18 09:34:50
If there is a callback after the loading is completed, make a fake progress. After completing the callback, just set the progress to 100%
黄舟2017-04-18 09:34:50
On Apple phones, except for Safari’s progress bar, which is real, everything else is fake
Customize a view with a height of 2 and change its width in the animation