I have a scroll view that it not scrolling at all:
scroll_view_content_a_job.contentSize.height = 1800
scroll_view_content_a_job.isScrollEnabled = true
You're using constraints in your scroll view, so the content size is determined by the constraints, not by setting the contentSize
in code. You need to fix your constraints so that they size the content from the inside out of the scroll view. The top subview of the scrollview needs to be pinned to the scrollview's top, and the bottom subview needs to be pinned to the scrollview's bottom, and all the views in between need to be pinned to one another, in such a way as to dictate the desired content size height. But the scroll view itself needs to be pinned to its superview, so that it is not taller than the screen. In other words, this will work when the sum of the constrained heights inside the scroll view is greater than the constrained height of the scroll view.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With