I have a
Scroll View with a View (content view) inside of it. I've added two buttons to test. The
Scroll View scrolls fine but the buttons within the content view are not clickable. I've seen plenty of posts saying this issue happens when they programmatically add
UIButtons to the View, but I am not doing this. Here is my exact process:
- Drag the Scroll View onto the main view. Add 4 constraints
- Drag the Content View onto the Scroll View. Add 4 constraints.
- Add 2 Buttons (one high and one low to test scrolling) to the Content View.
This is all I am doing, no code at this point. Is there anything else I have to do to allow the buttons to be clicked? Here is a screenshot of my xib:
When hooking the button up to a simple IBAction and logging a message, it turns out it IS being pushed and working properly. However, when the button is pushed, the button isn't changing colors like it should (its "pressed" state is not appearing). Any ideas why?