How to add UIScrollView to Interface builder?

后端 未结 10 2296
夕颜
夕颜 2020-12-12 17:50

I have all my controls laid out in interface builder (many labels, buttons etc). How do I put them all in a scroll view in interface builder so that I can have more space an

10条回答
  •  轮回少年
    2020-12-12 18:11

    Important little thing. To scroll big subview (UIImageView for example) in UIScrollView remember, for this subview, uncheck "User Interaction Enabled" checkbox in InterfaceBuilder -> View window. Or do it programatically.

    subview.userInteractionEnabled = NO;
    

    Otherwise this subview will stack on screen without any effect.

提交回复
热议问题