Hi,
create macOS project and I try to make UIViewRepresentable but get this error.
import SwiftUI
struct WebView: UIViewRepresentable { //Error: Use of undeclared type 'UIViewRepresentable'
}
What can I do with it or how can I make my own UIViewRepresentable for macOS to use WKWebView in my project?
struct WebView: UIViewRepresentable {
func makeUIView(context: Context) -> WKWebView {
WKWebView()
}
func updateUIView(_ uiView: WKWebView, context: Context) {
}
}
My question on stackoverflow