How can I add loading Indicator in the Footer of collection view when data is loaded for next page..?
I want to loading indicator in Footer of Collection vi
The easiest way it that add an UIView at the bottom of your ViewController add an ActivityIndicator to that view and set view's property hidden to checked, create an IBOutlet of that view, while loading data from server set outlet's property hidden=NO after data is loaded again hide the view. The same thing I've done in few of my apps using UICollectionViews or UITableView
EDIT
An another way is to add loading indicator in the footer of either CollectionView or tableview then make a network call in the below method
For CollectionView:
- (void)collectionView:(UICollectionView *)collectionView willDisplaySupplementaryView:(UICollectionReusableView *)view forElementKind:(NSString *)elementKind atIndexPath:(NSIndexPath *)indexPath;
And For TableView:
- (void)tableView:(UITableView *)tableView willDisplayFooterView:(UIView *)view forSection:(NSInteger)section;
Swift 4.2
For CollectionView:
func collectionView(_ collectionView: UICollectionView, willDisplaySupplementaryView view: UICollectionReusableView, forElementKind elementKind: String, at indexPath: IndexPath)
For TableView:
func tableView(_ tableView: UITableView, willDisplayFooterView view: UIView, forSection section: Int)