UIButtons at the bottom of UIScrollView not working

For me it was all just to Uncheck the checkbox Adjust Scroll View Insets in the storyboard of that ViewController.

enter image description here

PS: The above answers didn't worked for me.


It seems you need to increase the frame height of container view. The contentSize of scrollView only affects how it will scroll, which is irrelevant here.

If the button is outside the container view, it will still show up. However, it can't respond to any touch event.


when using scrollview in storyboard with autolayout. it is usually set up using a content view inside the scrollview that will contain all the other views (e.g. buttons, labels, etc.) the content view are usually set to have equal height and equal width.

to make your content view expand it's height, you need to add a height constraint then assign it to an outlet so you could easily manipulate it's value with in your code. then set the content view's height constraint priority to 1000 ("required") and set the content view's "equal width to:view" constraint priority to 750 (high).