Skip to content

Instantly share code, notes, and snippets.

View rama-adi's full-sized avatar
🎯
Focusing

Rama Adi Nugraha rama-adi

🎯
Focusing
View GitHub Profile
@JSerZANP
JSerZANP / ContentView.swift
Created March 4, 2021 14:01
communication between native(swiftUI) and wkwebview
import SwiftUI
import WebKit
struct WebView: UIViewRepresentable {
class Coordinator: NSObject, WKNavigationDelegate, WKScriptMessageHandler {
var webView: WKWebView?
func webView(_ webView: WKWebView, didFinish navigation: WKNavigation!) {
self.webView = webView
}