I have a UIViewText that I have in all my UIViewControllers that carries over data from the entire app's instance.
If I put the 2 lines that scroll to the bottom in the viewDidAppear section, the text scrolls to the bottom, but you see it occur, so it's not pleasant visually.
However, if I put the same 2 lines in the viewWillAppear section (as shown below) then for some reason the UITextView starts at the top of the text.
Am I somehow doing this incorrectly?
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
myStatusWin.text = db.status
let range = NSMakeRange(myStatusWin.text.count - 1, 0)
myStatusWin.scrollRangeToVisible(range)
}
override func viewDidAppear(_ animated: Bool) {
super.viewDidAppear(animated)
}