why is scrollView property of WKWebView exposed to public if WebKit doesn't want us to alter any of its properties ?
I am the one that doesn't want you messing with the scroll views, not WebKit.
I'm just thinking think from a point of view where its is a bug in webkit.
That's funny. You mean "a bug", as in singular? It's riddled with bugs. And I'm only talking about things that it is supposed to be able to do. On the Mac, it still doesn't have major features like printing.
You just have to be very careful with web views. You should not attempt to use them as regular views. Use them as opaque views. They have their own scroll views. If you want to control how scrolling works, you should do that via Javascript or CSS. You might be able to find some magic combination that works today, but it might not work tomorrow.
I'm a pretty heavy user of web views. I commonly run into the same bugs and problems that other people encounter. I can search the usual places on the web and find literally dozens of different suggestions that are guaranteed to work. Not a single one will work.
On the bright side, once I'm inside the view itself, in HTML/JS/CSS, I find it to be very reliable. I don't have to worry about cross-browser issues.
You have a couple of options. You can put everything inside the web view, which is easy enough. Or, you can stretch the web view to accomodate all of your input and put both your webview and header inside a scroll view.