NJKWebViewProgress is a progress interface library for UIWebView. Currently, UIWebView don't have official progress interface. You can implement progress bar for your in-app browser using this module.
NJKWebViewProgress don't use CocoaTouch's private methods. It may be AppStore safe.
- iOS 5 or later
- ARC
Instance NJKWebViewProgress
and set UIWebViewDelegate
. If you set webViewProxyDelegate
, NJKWebViewProgress
suould perform as a proxy object.
NJKWebViewProgress *progressProxy = [[NJKWebViewProgress alloc] init];
webView.delegate = progressProxy;
progressProxy.webViewProxyDelegate = self;
progressProxy.progressDelegate = self;
When UIWebView start loading, NJKWebViewProgress
call delegate method and block with progress.
-(void)webViewProgress:(NJKWebViewProgress *)webViewProgress updateProgress:(float)progress
{
[progressView setProgress:progress animated:NO];
}
progressProxy.progressBlock = ^(float progress) {
[progressView setProgress:progress animated:NO];
};
pod 'NJKWebViewProgress'