Reputation: 115
In the picture you can see the structure of my Storyboard: View -> ScrollView -> ContentView (view) -> Views . The button in blue image appears out of the screen in the phone, and when I move the scroll to it, the button doesn't detect the tap.
I have read in many forums and I added this:
scrollView.userInteractionEnabled = Bool(true);
scrollView.exclusiveTouch = Bool(true);
scrollView.canCancelContentTouches = Bool(true);
scrollView.delaysContentTouches = Bool(true);
In the StoryBoard I marked to de ScrollView "Delays Content Touches", and I marked to the button "User interaction enabled"
I don't know what to do.
Upvotes: 1
Views: 484
Reputation: 957
Posting answer for others to see:
When adding a scroll view with a content view in Storyboard, please make sure that the content size of the Content View inside your Scroll View is equal to the content size of your scroll view.
Otherwise, your content view will not detect touches which is outside the bounds of your phone screen height.
Glad to be of help!
Upvotes: 1