/NJKWebViewProgress

UIWebView progress interface

Primary LanguageObjective-CMIT LicenseMIT

NJKWebViewProgress

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.

iOS ScreenShot 1

NJKWebViewProgress don't use CocoaTouch's private methods. It may be AppStore safe.

Requirements

  • iOS 5 or later
  • ARC

Usage

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];
};

Install

CocoaPods

pod 'NJKWebViewProgress'

License

MIT license.