WKWebView scroll view access on OSX

If I create, via interface builder, a window with a WKWebView, all is nice. I wire it up, constraints and added drop-n-drop support for asset viewing. But upon loading say a movie for example, the window appears to obtain a scroll view.


This is easily triggered when resizing the window and make the window smaller - the video will be resized once vertical size is changed, but the addition of a horizontal scrollbar cannot be removed, unless a resize is large enough for the video to fit.


I'd like to hide the scroll views' sliders when the mouse leaves the window, but I first need a way to access the scrollView.


I have tried to query the WKWebView's enclosingScrollView - but always nil, and on MacOSX, there is no scrollView as on iOS.


Any help appreciated, thanks.

Did you ever get this figured out? I'm facing the same issue on macOS.
You'll probably want to ask in the WebKit section of the forum.

Hi I am facing the same issue . I want to access WkWebView's Scrollview on macOS . Has anybody found the solution for this issue. If so please share the solution or if there is any workaround please share.

Thanks in advance.

WKWebView scroll view access on OSX
 
 
Q