Post

Replies

Boosts

Views

Activity

Use of undeclared type 'UIViewRepresentable' in macOS project
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
2
0
8.4k
Nov ’22
Use of undeclared type 'UIViewRepresentable' in macOS project
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
Replies
2
Boosts
0
Views
8.4k
Activity
Nov ’22