I\'m running into a small issue in my app.
I essentially have a series of UIButtons added as subviews in a UIScrollView which is part of a
In Swift 3:
import UIKit
class ScrollViewWithButtons: UIScrollView {
override init(frame: CGRect) {
super.init(frame: frame)
myInit()
}
required init?(coder aDecoder: NSCoder) {
super.init(coder: aDecoder)
myInit()
}
private func myInit() {
self.delaysContentTouches = false
}
override func touchesShouldCancel(in view: UIView) -> Bool {
if view is UIButton {
return true
}
return super.touchesShouldCancel(in: view)
}
}
You can then use this ScrollViewWithButtons in IB or in code.