Quick Answer: How Do I Open Webview in iOS Swift?
Contents

How do I open webView in Swift?

In Swift 4 or 4.2 You can use like:

  1. Add WKWebView & connect to you view comtroller.
  2. Your view is like bellow: import UIKit import WebKit class ViewController: UIViewController { @IBOutlet weak var wkwebview: WKWebView!

How do I use webView in Xcode?

Let’s dive in!

  1. Step 1: Create a new View Controller. Go to Xcode and create a new file>Cocoa touch Class>Subclass of UIViewController — Call it WebViewController and press “Next” & “Create”
  2. Step 2: Import the framework & Delegate. …
  3. Step 3: Load the view. …
  4. Step 4: Present the Web View. …
  5. Step 5: Run your app!
Alexander Ross

Alexander Ross

Gaming, Esports & Interactive Media Writer

Alexander Ross has covered the video game industry for a decade, writing deep dives on game design, esports tournaments, VR developments, and gaming culture.

Share this article
Twitter Facebook Pinterest