ios - UIwebView顶部进度条怎么实现的?
大家讲道理
大家讲道理 2017-04-18 09:32:50
0
7
309


UIwebView顶部进度条怎么实现的?有现成的开源库吗?
目前用的是SVProgressHUD ,他好像只能在屏幕中间显示一个圈圈。。

大家讲道理
大家讲道理

光阴似箭催人老,日月如移越少年。

reply all(7)
洪涛

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%

迷茫

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

黄舟

SVProgressHUD, it just shows whether loading is complete.
Use this NJKWebViewProgress. There is an address in it

洪涛

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];
巴扎黑

UIWebview does not support progress bar, iOS 8 or above can use WkWebview

巴扎黑

If there is a callback after the loading is completed, make a fake progress. After completing the callback, just set the progress to 100%

黄舟

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

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template