Hi, apologies for asking a simple question, but I am new to development and don't know how to code. I just wanted to take my website and make an app out of it, but am having problems knowing how to add magnification.
What line(s) of code do I add, and where do I add it, to give the user the ability to zoom in with a pinch action. (Apologies in advance, but please don't answer in technical language, because I don't understand it).
Currently my code looks like this (but the magnification doesn't work):
import UIKit
import WebKit
class ViewController: UIViewController, WKUIDelegate {
var webView: WKWebView!
override func loadView() {
let webConfiguration = WKWebViewConfiguration()
webView = WKWebView(frame: .zero, configuration: webConfiguration)
webView.uiDelegate = self
view = webView
}
override func viewDidLoad() {
super.viewDidLoad()
let myURL = URL(string:"https://examplexxxx.)
let myRequest = URLRequest(url: myURL!)
webView.load(myRequest)
webView.allowsBackForwardNavigationGestures = true
var allowsMagnification: Bool { true }
}}
What line(s) of code do I add, and where do I add it, to give the user the ability to zoom in with a pinch action. (Apologies in advance, but please don't answer in technical language, because I don't understand it).
Currently my code looks like this (but the magnification doesn't work):
import UIKit
import WebKit
class ViewController: UIViewController, WKUIDelegate {
var webView: WKWebView!
override func loadView() {
let webConfiguration = WKWebViewConfiguration()
webView = WKWebView(frame: .zero, configuration: webConfiguration)
webView.uiDelegate = self
view = webView
}
override func viewDidLoad() {
super.viewDidLoad()
let myURL = URL(string:"https://examplexxxx.)
let myRequest = URLRequest(url: myURL!)
webView.load(myRequest)
webView.allowsBackForwardNavigationGestures = true
var allowsMagnification: Bool { true }
}}