(Don\'t mark this question as duplicated. I read a lot of questions but I don\'t find the answer to my issue.)
My issue is the following: I have a UIScrollView
Use next class, setting canScroll
as needed:
class BlockScrollView: UIScrollView {
var canScroll = true
override func setContentOffset(_ contentOffset: CGPoint, animated: Bool) {
if canScroll {
super.setContentOffset(contentOffset, animated: animated)
}
}
}
just add single Line
yourScrollView.bounces = false
and make Sure your scroll view subview(Content) height is equal to you scrollview height And you're Done