how do I use UIScrollView in Interface Builder?

后端 未结 17 1447
遇见更好的自我
遇见更好的自我 2020-11-28 19:52

While I\'ve used UIScrollView successfully in the past by manipulating it programmatically, I\'m having trouble getting it to work by setting it up exclusively

17条回答
  •  广开言路
    2020-11-28 19:58

    With Autolayout (iOS6+), you can avoid setting contentSize. Set the following constraints instead:

    1. Pin the top of the scrollview to the top of its top-most child.
    2. And pin the bottom to the bottom of its bottom-most child.

提交回复
热议问题