Scroll View not working

Hi everyone.
This is my first post on this forum. I am new to app development, and I am busy developing my very first app. Everything is working fine and I am very happy with the app - except that I am having a problem with getting the horizontal scroll to work - this is the only thing holding me up!

I have a number of labels, text blocks and buttons all within a scroll view, but when I run the app the scroll doesn’t work. I have tried changing the height, played around with different values, etc. but nothing I do seems to work.

Does anyone have any tips which could be of help? Or, is there perhaps a tutorial on this within the Code with Chris tutorials - I have looked in both the free and paid content but don’t see a lesson on using scroll views specifically.
I would appreciate any help which could solve this problem for me!!!
Thanks so much.


Did you set the contentView? If not it won’t scroll. Try this:

scrollView.contentSize = CGSize(width: UIScreen.main.bounds.width, height: UIScreen.main.bounds.height+300)


Hi Mark
Thanks very much for replying. Yes, I did already have that code included, but the scroll still won’t work. Not sure where I have missed something. All the fields are within the scrollview component on the storyboard, and I have set the contentView as you suggested. I really thought that scrolling would be such a simple thing to include, but this is proving to be extremely challenging. I’ll keep searching for an answer…but thank you anyway for your help. If you can think of anything else, please let me know.
Thanks a million!

Hmm, that is a puzzler. You have User Interaction enabled yes?

Let me ponder, I will see if I can come up with something.

Thanks Mark! I appreciate the help. “User Interaction” is enabled - yes!