Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

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:

enter image description here

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?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
451 views
Welcome To Ask or Share your Answers For Others

1 Answer

等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...