Coder Social home page Coder Social logo

carabina / progresswebviewcontroller Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kf99916/progresswebviewcontroller

0.0 1.0 0.0 538 KB

A webViewController implemented by WKWebView with a progress bar in the navigation bar

License: MIT License

Ruby 8.07% Swift 89.17% Objective-C 2.77%

progresswebviewcontroller's Introduction

ProgressWebViewController

A WebViewController implemented by WKWebView with a progress bar in the navigation bar. The WebViewController is safari-like web browser.

Language Swift CocoaPods Swift Package Manager compatible License

ProgressWebViewController ProgressWebViewController

Features

  • ✅ Progress bar in navigation bar
  • ✅ Bypass SSL according to the assigned hosts.( i.e., you can access the self-signed certificate websites with ProgressWebViewController)
  • ✅ Customize bar button items

Requirements

  • iOS 9.0 or higher
  • Swift 4.0 or higher

Installation

pod "ProgressWebViewController"

Usage

Import

import ProgressWebViewController

Integration

ProgressWebViewController

A view controller with WKWebView and a progress bar in the navigation bar

var url: URL? the url to request
var tintColor: UIColor? the tint color for the progress bar, navigation bar, and tool bar
var delegate: ProgressWebViewControllerDelegate? the delegate for ProgressWebViewController
var bypassedSSLHosts: [String]? the bypassed SSL hosts. The hosts must also be disabled in the App Transport Security.
var websiteTitleInNavigationBar = true show the website title in the navigation bar
var doneBarButtonItemPosition: NavigationBarPosition the position for the done bar button item. the done barbutton item is added automatically if the view controller is presented.(default .left)
var leftNavigaionBarItemTypes: [BarButtonItemType] configure the bar button items in the left navigation bar (default [])
var rightNavigaionBarItemTypes: [BarButtonItemType] configure the bar button items in the right navigation bar (default [])
var toolbarItemTypes: [BarButtonItemType] configure the bar button items in the toolbar of navigation controller (default [.back, .forward, .reload, .activity])

ProgressWebViewControllerDelegate

The delegate for ProgressWebViwController

optional func progressWebViewController(_ controller: ProgressWebViewController, canDismiss url: URL) -> Bool
optional func progressWebViewController(_ controller: ProgressWebViewController, didStart url: URL)
optional func progressWebViewController(_ controller: ProgressWebViewController, didFinish url: URL)
optional func progressWebViewController(_ controller: ProgressWebViewController, didFail url: URL, withError error: Error)
optional func progressWebViewController(_ controller: ProgressWebViewController, decidePolicy url: URL) -> Bool

BarButtonItemType

The enum for bar button item

enum BarButtonItemType {
    case back
    case forward
    case reload
    case stop
    case activity
    case done
    case flexibleSpace
}

NavigationBarPosition

The enum for position of bar button item in the navigation bar

enum NavigationBarPosition {
    case none
    case left
    case right
}

Apps using ProgressWebViewController

If you are using ProgressWebViewController in your app and want to be listed here, simply create a pull request.

I am always curious who is using my projects :)

Hikingbook - by Zheng-Xiang Ke

Hikingbook

Demo

ProgressWebViewControllerDemo is a simple demo app which browse the Apple website with ProgressWebViewController.

Author

Zheng-Xiang Ke, [email protected]

License

ProgressWebViewController is available under the MIT license. See the LICENSE file for more info.

progresswebviewcontroller's People

Contributors

kf99916 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.