I am using displayData = UITextView()
and displayData.isScrollEnabled = true
to display some data in a scrollable view.
The data should be entirely contained within the textview.
Scrolling works as expected, except that the data extends below the textView's lower bound (but not above the upper bound), and appears on top of other views:
I have played around with all of the following without success:
displayData.contentInset = UIEdgeInsets.zero
displayData.clipsToBounds = true
super.clipsToBounds = true
displayData.layer.masksToBounds = true
displayData.scrollRectToVisible(displayData.bounds, animated: true)
How do I prevent the content from scrolling outside the textView?