Create accessible experiences for watchOS

RSS for tag

Discuss the WWDC21 session Create accessible experiences for watchOS.

View Session

Posts under wwdc21-10223 tag

4 Posts
Sort by:
Post not yet marked as solved
0 Replies
392 Views
I have enabled the following swipe gesture and it works however with voiceover it doesnt respond and doesnt allow the user to go back with the two finger swipe from left to right Heres the code that i have written so far - import UIKit import WebKit class ViewController: UIViewController { let webView: WKWebView = { let prefs = WKWebpagePreferences() prefs.allowsContentJavaScript = true let configuration = WKWebViewConfiguration() configuration.defaultWebpagePreferences = prefs let webView = WKWebView(frame: .zero, configuration: configuration) return webView }() override func viewDidLoad() { super.viewDidLoad() view.addSubview(webView) guard let url = URL(string: "https://sindhisystems.co.uk") else { return } func goBack(_ sender: Any) { webView.goBack() } webView.load(URLRequest(url: url)) webView.customUserAgent = "iPad/Chrome/SomethingRandom" webView.allowsBackForwardNavigationGestures = true DispatchQueue.main.asyncAfter(deadline: .now()+5) { self.webView.evaluateJavaScript("document.body.innerHTML") { result, error in guard let html = result as? String, error == nil else { return } print(html) } } } override func viewDidLayoutSubviews() { super.viewDidLayoutSubviews() webView.frame = view.bounds } }
Posted Last updated
.
Post not yet marked as solved
0 Replies
309 Views
Is it possible to add custom gesture to the full keyboard access?
Posted
by King246.
Last updated
.