UITextView inside UIScrollView with AutoLayout

后端 未结 4 1072
庸人自扰
庸人自扰 2020-11-28 06:09

I am trying to place UITextView inside UIScrollView with AutoLayout with no luck. What I have tried is,

  • I placed UIScrollView inside the main view in Storyboar
4条回答
  •  旧巷少年郎
    2020-11-28 06:52

    Sodbileg's solution above works, but you do not need all of his steps. I got my scrollview to scroll with a text view inside by following his steps through step 7. For step 8, I added the 4 constraints but not the height (Don't forget the bottom constraint!!). I did not do the rest.

    I am not sure, but it seems that the height of the textview adjusts automatically instead of us having to manually change it.

提交回复
热议问题