Latest 1.1.0
Homepage https://github.com/swordray/JXWebViewController
License MIT
Platforms ios 11.0
Frameworks UIKit, WebKit
Authors

An iOS view controller wrapper for WKWebView.

CI Status
Version
License
Platform

Since iOS 8, WKWebView is preferred over UIWebView. But unlike UIWebView, WKWebView provide less default behaviors due to the security design. JXWebViewController wrap up a WKWebView and implements a few standard features as iOS Safari does. So web views can be easily used in your apps out-of-the-box. It is also referred to as WebViewController, UIWebViewController or WKWebViewController.

Features

  • Allows back forward navigation gestures.
  • Support HTTP Basic access authentication.
  • Implement JavaScript alert, confirm and prompt.
  • Open native links of mailto, tel, itms-apps and so on.
  • Open and close pages in current view.
  • Peek & pop links by 3D Touch.
  • Reload when web content process is terminated.
  • Perform auto detection of phone numbers.
  • Proxy the page title to the controller title.
  • Add the refresh control.
  • Support Handoff from app to Safari.

Requirements

  • iOS 11.0+
  • Xcode 9.0+
  • Swift 4.0+

Installation

JXWebViewController is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod 'JXWebViewController'

Usage

Quick Start

let url = URL(string: "https://example.com/")!

let webViewController = JXWebViewController()
webViewController.webView.load(URLRequest(url: url))
navigationController?.pushViewController(webViewController, animated: true)

Customization

Credits

Jianqiu Xiao, [email protected]

License

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

Latest podspec

{
    "name": "JXWebViewController",
    "version": "1.1.0",
    "summary": "An iOS view controller wrapper for WKWebView.",
    "description": "Since iOS 8, WKWebView is preferred over UIWebView. But unlike UIWebView, WKWebView provide less default behaviors due to the security design. JXWebViewController wrap up a WKWebView and implements a few standard features as iOS Safari does. So web views can be easily used in your apps out-of-the-box. It is also referred to as WebViewController, UIWebViewController or WKWebViewController.",
    "homepage": "https://github.com/swordray/JXWebViewController",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Jianqiu Xiao": "[email protected]"
    },
    "source": {
        "git": "https://github.com/swordray/JXWebViewController.git",
        "tag": "1.1.0"
    },
    "platforms": {
        "ios": "11.0"
    },
    "source_files": "JXWebViewController/Classes/**/*",
    "resource_bundles": {
        "JXWebViewController": [
            "JXWebViewController/*.lproj"
        ]
    },
    "frameworks": [
        "UIKit",
        "WebKit"
    ],
    "swift_version": "4.2"
}

Pin It on Pinterest

Share This