0

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.

Community
  • 1
  • 1
Adrian
  • 21
  • 9

1 Answers1

1

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
   }
}
jackchmbrln
  • 1,672
  • 2
  • 14
  • 26