I put the UIView inside a scrollview in my iOS app and it does not scroll. What am I doing wrong?
问题 In my storyboard I put the UIScrollView on my UIViewController . Inside I put a UIView with a UIButton , but when I run the app I cannot scroll the UIView . What am I doing wrong? This is how the hierarchy looks: and the properties of scroll view: and the view (which has a bigger size than scrollview) : How can I make it scrollable? 回答1: From your image it's look like you are using autolayout. So to make view scrollable you need to set the constraints to scrollview and its sub view.