mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-08-26 23:39:12 +00:00
28 lines
761 B
Swift
28 lines
761 B
Swift
#if os(macOS)
|
|
#else
|
|
import UIKit
|
|
#endif
|
|
|
|
class ListViewScroller: UIScrollView, UIGestureRecognizerDelegate {
|
|
override init(frame: CGRect) {
|
|
super.init(frame: frame)
|
|
|
|
self.scrollsToTop = false
|
|
if #available(iOSApplicationExtension 11.0, *) {
|
|
self.contentInsetAdjustmentBehavior = .never
|
|
}
|
|
}
|
|
|
|
required init?(coder aDecoder: NSCoder) {
|
|
fatalError("init(coder:) has not been implemented")
|
|
}
|
|
|
|
@objc func gestureRecognizer(_ gestureRecognizer: UIGestureRecognizer, shouldRecognizeSimultaneouslyWith otherGestureRecognizer: UIGestureRecognizer) -> Bool {
|
|
return false
|
|
}
|
|
|
|
override func touchesShouldCancel(in view: UIView) -> Bool {
|
|
return true
|
|
}
|
|
}
|