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

Categories

0 votes
111 views
in Technique[技术] by (71.8m points)

ios - textView constraints in scrollView

I have a textView which loads text from my server and I am trying to make it flexable in the scroll view and if the text is long it should expand and if text is short it comes back to the size of the text enter image description here

I did not tried any code because I think this is constraints issue

question from:https://stackoverflow.com/questions/65915447/textview-constraints-in-scrollview

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

1 Answer

0 votes
by (71.8m points)

Set the constraints of the UITextView top, left, right and remove the bottom constraint and it should work.

Tested with Xcode 12.3 , Swift 5


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...