All Projects → ninjinkun → Njkwebviewprogress

ninjinkun / Njkwebviewprogress

Licence: mit
UIWebView progress interface

Programming Languages

objective c
16641 projects - #2 most used programming language
ruby
36898 projects - #4 most used programming language

Labels

Projects that are alternatives of or similar to Njkwebviewprogress

XLRefresh
iOS 下拉刷新工具
Stars: ✭ 25 (-99.37%)
Mutual labels:  uiwebview
QuickWebKit
A great & strong plugin based WebViewController. 一款基于插件的 WebView 视图控制器,您可以基于它设计您的浏览器插件,然后像积木一样来组装它们。
Stars: ✭ 29 (-99.27%)
Mutual labels:  uiwebview
JJGWebView
UIWebView class and example implementation for iOS Applications
Stars: ✭ 33 (-99.16%)
Mutual labels:  uiwebview
HTMLWithImagesToPDF
Generate a PDF from an HTML file containing images (iOS).
Stars: ✭ 38 (-99.04%)
Mutual labels:  uiwebview
JsBridge-WebViewJavascriptBridge-Sample
iOS JsBridge Solution by WebViewJavascriptBridge
Stars: ✭ 16 (-99.59%)
Mutual labels:  uiwebview
Towebviewcontroller
A view controller class for iOS that allows users to view web pages directly within an app.
Stars: ✭ 1,500 (-62%)
Mutual labels:  uiwebview

NJKWebViewProgress

NJKWebViewProgress is a progress interface library for UIWebView. Currently, UIWebView doesn't have official progress interface. You can implement progress bar for your in-app browser using this module.

iOS ScreenShot 1

NJKWebViewProgress doesn't use CocoaTouch's private methods. It's AppStore safe.

Used in Production

Requirements

  • iOS 4.3 or later
  • ARC

Usage

Instance NJKWebViewProgress and set UIWebViewDelegate. If you set webViewProxyDelegate, NJKWebViewProgress should perform as a proxy object.

_progressProxy = [[NJKWebViewProgress alloc] init]; // instance variable
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];
};

You can determine the current state of the document by comparing the progress value to one of the provided constants:

-(void)webViewProgress:(NJKWebViewProgress *)webViewProgress updateProgress:(float)progress
{
    if (progress == NJKInteractiveProgressValue) {
        // The web view has finished parsing the document,
        // but is still loading sub-resources
    }
}

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.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].