Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show webpage #10

Open
tharthiha opened this issue Dec 17, 2018 · 1 comment
Open

Show webpage #10

tharthiha opened this issue Dec 17, 2018 · 1 comment

Comments

@tharthiha
Copy link

I want to show webpage after scan. how can i do that?

@sebromero
Copy link
Owner

Basically you can take the url from the QR code and pass it to the presenting view controller which contains a web view like so:

override func processQRCodeContent(qrCodeContent: String) -> Bool {

        if let presenter = presentingViewController as? MyWebViewController {
                let url = URL(string: qrCodeContent)!
                presenter.url = url
                let webView = WKWebView()
                webView.load(URLRequest(url: url))
                presenter.view = webView
        }

        dismiss(animated: true, completion: nil)
        return true
    }

Does that help?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants