Skip to content

lingling2012/NJKWebViewProgress

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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's AppStore safe.

Requirements

  • iOS 4.3 or later
  • ARC

Usage

Instance NJKWebViewProgress and set UIWebViewDelegate. If you set webViewProxyDelegate, NJKWebViewProgress should 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];
};

This repository contains iOS 7 Safari style bar NJKWebViewProgressView. You can choose NJKWebViewProgressView, UIProgressView or your custom bar.

Install

CocoaPods

pod 'NJKWebViewProgress'

License

MIT license.

About

UIWebView progress interface

Resources

License

Stars

Watchers

Forks

Packages

No packages published