An API I am writing has about 2000 records, returned in JSON via a simple RESTful API I have written.
To reduce issues with lots of data, I want to use pagination so
For Swift
func scrollViewDidScroll(scrollView: UIScrollView) { if collectionViewGif.contentOffset.y >= self.collectionViewGif.contentSize.height - self.collectionViewGif.frame.size.height { offset = offset + 1 self.fetchGifWithPaination(defaultText) } }