/PMWebView

Primary LanguageSwiftMIT LicenseMIT

PMWebView

CI Status Version License Platform

Preview

pmwebview-1

Example

extension ViewController {
    private func presentPMWevViewAsChild() {
        let vc = PMWebViewBuilder.build(
            url: url,
            output: self
        )
        pmWebViewInput = vc
        addChildViewController(vc)
        vc.didMove(toParentViewController: self)
    }

    private func presentPMWevViewAsModal() {
        let vc = PMWebViewBuilder.build(
            url: url,
            output: self
        )
        pmWebViewInput = vc
        present(vc, animated: true)
    }
}

extension ViewController: PMWebViewOutput {
    func webViewWillAppear() {
        print("webViewWillAppear")
    }

    func webViewWillDisappear() {
        print("webViewWillDisappear")
    }
}

More details in Example project

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

Installation

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

pod 'PMWebView'

Author

PattoMotto

License

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