'How to scroll a Swift webview programmatically

What methods of the UIWebView class can be used to scroll programmatically? Are there any in the delegate? Also, what methods exist outside of the UIScrollView? Pardon the pushy questions. If you have any suggestions outside of my parameters, please tell me. Also, please dont give SwiftUI answers. I want to do everything in UIKit. Thank you.



Solution 1:[1]

UIWebView can be used to support legacy systems. You should prefer using WKWebView if you are not aiming to support older versions.

With WKWebView, you could enable scroll in the following manner:

webview.scrollView.scrollEnabled = TRUE;

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Zohair Abbas Hadi