# Unable to load items from server on CollectionView Scroll end

**URL:** <https://forums.kodeco.com/t/unable-to-load-items-from-server-on-collectionview-scroll-end/89574>\
**Category:** Swift\
**Created:** [November 28, 2019, 3:54am UTC](https://forums.kodeco.com/t/unable-to-load-items-from-server-on-collectionview-scroll-end/89574 "2019-11-28T03:54:14Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![akashlal](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/akashlal/32/103097_2.png) [@akashlal](https://forums.kodeco.com/u/akashlal)\
**Post date:** [November 28, 2019, 3:54am UTC](https://forums.kodeco.com/t/unable-to-load-items-from-server-on-collectionview-scroll-end/89574/1 "2019-11-28T03:54:14Z")

</div>

I am trying to make an api call to fetch contents from server, when collection view is about to end scrolling.  
I plan to override  
override func collectionView(\_ collectionView: UICollectionView, willDisplay cell: UICollectionViewCell, forItemAt indexPath: IndexPath) {  
if indexPath.row == array.count - 1 {  
getNextSetOfData()  
}  
}  
this function of UICollectionView. How do I find out the protocol which is responsible to make this function work?  
I have delegates for collection.delegate, collection.dataSource, collection.UICollectionViewDelegateFlowLayout set and protocols implemented, but when I try to override func collectionView(\_ collectionView: UICollectionView, willDisplay cell: UICollectionViewCell, forItemAt indexPath: IndexPath), an error pops up - “Method does not override any method from its superclass”

---

<div class="post-metadata">

**Author:** ![akashlal](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/akashlal/32/103097_2.png) [@akashlal](https://forums.kodeco.com/u/akashlal)\
**Post date:** [November 29, 2019, 9:42am UTC](https://forums.kodeco.com/t/unable-to-load-items-from-server-on-collectionview-scroll-end/89574/2 "2019-11-29T09:42:23Z")

</div>

Please delete this question. I figured out, had to delete override to make it work

---

<div class="post-metadata">

**Author:** ![jayantvarma](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/jayantvarma/32/111768_2.png) [@jayantvarma](https://forums.kodeco.com/u/jayantvarma)\
**Post date:** [December 16, 2019, 10:20am UTC](https://forums.kodeco.com/t/unable-to-load-items-from-server-on-collectionview-scroll-end/89574/3 "2019-12-16T10:20:20Z")

</div>

I’ll close this topic

---

<div class="post-metadata">

**Author:** ![system](https://s3.amazonaws.com/cdn.raywenderlich.com/community/forum-assets/noun-game-ghost-878668.png) [@system](https://forums.kodeco.com/u/system)\
**Post date:** [May 12, 2020, 7:54pm UTC](https://forums.kodeco.com/t/unable-to-load-items-from-server-on-collectionview-scroll-end/89574/4 "2020-05-12T19:54:17Z")

</div>

Closed on May 12, 2020, 7:54pm UTC

This topic was automatically closed after 166 days. New replies are no longer allowed.
