0

I have a large RTF file filled with text that when placed into a UITextView ends up scrolling slowly. Im looking to break up the text so that it renders just enough and only when needed (Similar to a UITableView).

I've seen posts about tiling but all of them pertain to Images.

How can I render the text from the RTF file so that only the text on screen and soon to be on screen are loaded into memory while everything else is released, hopefully leading to smoother scrolling.

huddie96
  • 1,240
  • 2
  • 13
  • 26
  • What looks like you have to write some custom code, which will be really tricky. For example you load the first 100 characters into UITextView then when user scroll it up, then you have to add new characters and the logic/algo has to be checked when the UITextView is moved up or down. – gurmandeep Aug 26 '16 at 03:21
  • @gurmandeep any articles or ideas how to start that. ? – huddie96 Oct 17 '16 at 23:54
  • You working with Swift or Objc? – gurmandeep Oct 18 '16 at 04:17
  • Did you add an UITextView and started rendering the text into it? http://stackoverflow.com/questions/20781506/format-text-in-uitextview – gurmandeep Oct 18 '16 at 07:53
  • @gurmandeep I've tried that (slow scrolling but quick initial render and quick font resizing). I've also tried HTML file into a UIWebview (Fast scrolling but slow initial render and font resizing). - The solution is to break it up and load as the user scrolls, just have no idea how to achieve this. – huddie96 Oct 18 '16 at 08:12
  • @gurmandeep Any ideas of how to approach this? – huddie96 Oct 18 '16 at 14:15

0 Answers0