Reputation: 760
I already know vertical or horizontal bounces. What I want is to prevent scrolling up.
So, only the right, left, and bottom directions are scrollable. How is it possible?
Upvotes: 2
Views: 1176
Reputation: 2010
If you want "disable" only top bounce. You can use:
func scrollViewDidScroll(scrollView: UIScrollView) {
if scrollView.contentOffset.y < 0 {
scrollView.contentOffset.y = 0
}
}
Upvotes: 2