This answer add an instance of WKUserScript
to set scalesPageToFit
value to true
, but I need to create two methods that enable and disable scalesPageToFit
.
Enabling is already answered in that post but I need to know how to disable it.
This answer add an instance of WKUserScript
to set scalesPageToFit
value to true
, but I need to create two methods that enable and disable scalesPageToFit
.
Enabling is already answered in that post but I need to know how to disable it.
Checking the framework I managed to call a method for WKUserContentController
to remove all associated user scripts. A WKUserContentController
object provides a way for JavaScript to post messages to a web view (Documentation)
- (void) disableZoom {
[self.webview.configuration.userContentController removeAllUserScripts];
}