I am trying to load the contents of a file to a TextView
on viewDidLoad()
of a ViewController
. I want the user to see the last content loaded from the file, so I tried the solutions mentioned here.
let bottom = textView.contentSize.height - textView.bounds.size.height
textView.setContentOffset(CGPoint(x: 0, y: bottom), animated:true)
The textview will scroll down but creates a large white space if we scroll down again.