Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>This is a difficult problem and there is no easy/elegant way to solve it. </p> <p>One way to speed up the scroll would be to lazy load the pages as you stated in your question. However, in order to ensure smoothness you would have to control when the loading happens. </p> <p>So say you began by loading the first 5 pages on initial launch. When the user scrolls to page 2 and <strong>STOPS</strong>, you begin loading page 6. As soon as the user starts scrolling again you pause the loading only to resume when they have stopped on a new page. Pausing the loading in between will help smooth out the scrolling. Also, make sure you release data when possible because it can build up and hinder smooth scrolling down the line. </p> <p>Another option would be to have the UIWebViews begin loading only as soon as the user stops on the page. So say I scroll to page to, once the scrolling stops I begin to load the HTML. This is not as "pretty" as the first options but it will ensure that the scrolling is smooth. </p> <p>Another option, this one is a bit out there, is to run through and load all the HTML pages rich text. Leaving out all the DOM intensive stuff. Then grab a screen shot of those semi-loaded page <a href="https://stackoverflow.com/questions/7964153/ios-whats-the-fastest-most-performant-way-to-make-a-screenshot-programaticall">using this method</a>. When the user stops on the page you load it all the way including the DOM intensive stuff. This will let the user feel as thought they are scrolling quick with everything loaded. </p> <p><a href="https://github.com/100grams/HGPageScrollView" rel="nofollow noreferrer">Here is a great scrolling class that I have used before.</a> </p> <p><a href="https://github.com/Cocoanetics/DTCoreText" rel="nofollow noreferrer">Here is some code to help with method 3.</a> </p> <p>Good luck and I hope that this helps! </p> <p>EDIT: <a href="http://engineering.linkedin.com/linkedin-ipad-5-techniques-smooth-infinite-scrolling-html5" rel="nofollow noreferrer">Here is a great post from the guys at LinkedIn on how they solved webView scrolling problems. It would be worth a read.</a> </p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload