Forgive me if this has already been answered elsewhere, but I couldn't find a thread about this:
I have a VC with the following hierarchy:
I want my ContentView elements to scroll within my ScrollView. I have a lot of definitions in the textView, and some are longer than others. Previously, only the longer definitions would scroll and the shorter ones wouldn't, but since I had an auto layout conflict, the links weren't able to be clicked at the end. I have the ScrollView constrained to the View and the ContentView constrained to the ScrollView. I also have the ContentView constrained equalWidth and equalHeight from the main View. In order for this solution to work, I had to set the height of the ContentView to something like 1000 pts so that longer definitions wouldn't be cut off. The only problem is that now all the definitions are scrolling (even ones that don't need to - that don't have enough text to go over the screen). And the user can scroll down and see enough white space to cover the screen, depending on how brief the definition is.
My question is: how can I arrange the constraints so that longer definitions scroll when needed and shorter ones do not - how can I set the constraint dynamically?
Thanks