Uiwebview is updated after scaling and compression

I have uiwebview in my application. So far, everything is working fine, but when I enlarge or reduce the image, for example, uiwebview updates the loaded page, and then scrolls and zooms to the new location and page size. Thus, scaling works well, but I do not want the user to see the website being updated and repositioned.

Is there any way to prevent this?

Thanks for any tips!

+3
source share
2 answers

This may be due to the fact that you may have encoded your scale in an odd way. You can try to delete all the scaling code and in the same method where you have loadRequest for webView, enter:

self.webView.scalesPageToFit = YES

Hope this helps.

0
source

You should refresh your page dynamically, and not refresh it through web browsing. You can accomplish this using AJAX or get the content in Objective-C and enter it using stringByEvaluatingJavaScriptFromString:.

0
source

Source: https://habr.com/ru/post/1748243/


All Articles