(Swift) WKWebView wrapper
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Classes/ios
Example
.gitignore add .gitignore Oct 14, 2016
.swift-version implement EcpWebView and add Example Oct 14, 2016
EcpWebView.podspec
LICENSE implement EcpWebView and add Example Oct 14, 2016
README.md Add README Oct 14, 2016

README.md

EcpWebView

This is only a WKWebView wrapper. NetworkActivityIndicator is automatically turned on during loading and turned off on finish loading.

Installation

You can install via CocoaPods

# required Swift 3.0
pod 'EcpWebView'

Usage

You can simply replace WKWebView to EcpWebView

let webView = EcpWebView()
view.addSubview(webView)

let req = URLRequest(url: URL(string: "https://memo.ecp.plus/")!)
webView.load(req)

WKWebView can't be used in StoryBoards, so the code following will help you.

webView.topAnchor.constraint(equalTo: view.topAnchor).isActive = true
webView.bottomAnchor.constraint(equalTo: view.bottomAnchor).isActive = true
webView.leadingAnchor.constraint(equalTo: view.leadingAnchor).isActive = true
webView.trailingAnchor.constraint(equalTo: view.trailingAnchor).isActive = true