var webViewModel = WebViewModel() var body: some View { VStack(spacing: 0) { SearchBar(inputText: $webViewModel.inputText) .onSubmit { webViewModel.search() } ProgressView(value: webViewModel.progress) WrappedWKWebView(setWebViewHandler: { webView in webViewModel.setWebView(webView) }) } } } Modelͷsearch()Λୟ͘ WKWebViewͷΠϯελϯεΛModelʹ͢ Q, Կݺͼग़͞Εͯ͠·͏ͷͰʁ A, UIViewRepresentableͷmakeUIView()
Ұ͔͠ݺΕͳ͍ͷͰͳ͍