0

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.

aguilarpgc
  • 1,181
  • 12
  • 24

1 Answers1

0

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];
}
aguilarpgc
  • 1,181
  • 12
  • 24