Reputation: 21
I'm working in XCode 8 / Swift 3. I'm having a UIPageViewController with three pages attached to it, and on the third page there's a UISlider. When you want to slide the element, the touch triggers the PageViewController and moves the page rather than the slider. You need to touch it for a second or so to be able to move it.
I found this but this solution is 3 years old and I'm not able to convert it into current syntax. I couldn't find any current examples.
Upvotes: 0
Views: 601
Reputation: 1713
Here is a Swift translation of the accepted Objective-C
from that other question
for view in pageViewController.view.subviews {
if view is UIScrollView {
(view as? UIScrollView)?.delaysContentTouches = false
}
}
Upvotes: 1