Animate UIWebView Resize

It’s really hard for me to try to revive resizing UIWebView, and I just don’t know where else to go.

Here is what I want to do: I have two views, one above the other (imagine two squares, one on top of the other). The top view is - UIWebViewand the bottom one is as general UIView(I have no problems with the bottom). I tweak two views every time new content loads just fine. I also have a button that should hide the view from below or show it depending on its previous state.

Where the problem arises. When the bottom view is hidden, pressing the button enlarges the frame and reduces the frame UIWebView. It's great. But if the bottom view is displayed and the button is pressed, the frame UIWebViewwill become larger and there will be problems with it:

  • If it UIWebViewscrolls to the end, it jumps a bit before going down (it gets bigger);

  • If the scroll UIWebViewscrolls to the very top, it crashes, as expected, as long as the scroll is enough for the view from below.

In general, what I found out is that if the content that is still below the bottom view is larger than the size of the resize, no jumps occur. Otherwise this happens.

I did a lot of research, asked the previous question , and therefore I assume that this is a consequence of lazy loading UIWebView. This “jump” happens so that it automatically changes (showing all the content, even if part of it is off the screen), and then moves down. Otherwise, it will expand and load new content at the same time, requiring much more processor power.

I experimented with frames, borders, and centers, and so far they haven’t been anywhere. Is my assumption correct? Is there a simple way to resize to resize UIWebViewso that it shrinks (when zoomed in) and retains the bottom scroll?

, , , UIWebView , , . , . .

- , , . .

+5
1

-, - , , -, , . , - - .

0

All Articles