Answer the question
In order to leave comments, you need to log in
How to properly display UIActivityIndicatorView on UICollectionView?
Hello.
UICollectionView dynamically loads elements from the network. One line has 2 elements. When the user scrolls to the bottom, a new piece of data is loaded.
- (void)scrollViewDidScroll:(UIScrollView *)scrollView {
NSInteger currentOffset = scrollView.contentOffset.y;
NSInteger maximumOffset = scrollView.contentSize.height - scrollView.frame.size.height;
if ((maximumOffset - currentOffset <= 70.0) && (self.requestSended == NO)) {
NSRange range = NSMakeRange(self.products.allKeys.count, 10);
[self loadProductsWithRange:range];
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question