HomeiOS Developmentios - Worth of kind 'some UIView' has no member 'scrollView'

ios – Worth of kind ‘some UIView’ has no member ‘scrollView’


I am making an attempt to load a youtube video in my app in swift ui

Tutorial I am following writes the next code

uiView.scrollView.isScrollEnabled = false
uiView. load(URLRequest(url: YouTubeURL))

In my case, I get the next error
Worth of kind ‘some UIView’ has no member ‘scrollView’

That is the entire struct if it helps

struct Video: UIViewRepresentable {
    let videoId: String?
    
    func makeUIView(context: Context) -> some UIView {
        return WKWebView()
    }
    
    func updateUIView(_ uiView: UIViewType, context: Context) {
        guard let ytId = videoId else { return }
        let ytUrl = URL(string: baseUrl + ytId)
        
        uiView.scrollView
        uiView.load
        
    }
}

Any concept repair that?

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments