↧
Answer by Radu Ghitescu for Check if a UIScrollView reached the top or bottom
Do it like this(for Swift 3):class MyClass: UIScrollViewDelegate { func scrollViewDidScroll(_ scrollView: UIScrollView) { if (scrollView.contentOffset.y >= (scrollView.contentSize.height -...
View ArticleAnswer by Rudolf Adamkovič for Check if a UIScrollView reached the top or bottom
Simple and clean extension:import UIKitextension UIScrollView { var scrolledToTop: Bool { let topEdge = 0 - contentInset.top return contentOffset.y <= topEdge } var scrolledToBottom: Bool { let...
View ArticleAnswer by ytbryan for Check if a UIScrollView reached the top or bottom
If you want the code in swift: override func scrollViewDidScroll(scrollView: UIScrollView) { if (scrollView.contentOffset.y >= (scrollView.contentSize.height - scrollView.frame.size.height)) {...
View ArticleAnswer by JPN for Check if a UIScrollView reached the top or bottom
I figured out exactly how to do it:CGFloat maxPosition = scrollView.contentInset.top + scrollView.contentSize.height + scrollView.contentInset.bottom - scrollView.bounds.size.height;CGFloat...
View ArticleAnswer by Alexander Dvornikov for Check if a UIScrollView reached the top or...
Well, contentInsets are also involved, when you try to determine whether scrollView is at the top or at the bottom. You might also be interested in cases when your scrollView is above the top and below...
View ArticleAnswer by Luke for Check if a UIScrollView reached the top or bottom
Implement the UIScrollViewDelegate in your class, and then add this:-(void)scrollViewDidScroll: (UIScrollView*)scrollView{ float scrollViewHeight = scrollView.frame.size.height; float...
View ArticleCheck if a UIScrollView reached the top or bottom
Is there a way to know if a UIScrollView has reached the top or bottom? Possibly in the method:- (void)scrollViewDidEndDragging:(UIScrollView *)scrollView willDecelerate:(BOOL)decelerate
View Article
More Pages to Explore .....