Advertisement
Guest User

Untitled

a guest
Apr 24th, 2019
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. //This method allows users to query for more messages by dragging down from the top.
  2. func scrollViewDidScroll(_ scrollView: UIScrollView){
  3. //If we are not loading more messages already
  4. if(!loadingMore){
  5.  
  6. //-40 is when you have dragged down from the top of all the messages
  7. if(scrollView.contentOffset.y < -40 ) {
  8. loadingMore = true
  9. addHistory(start: earliestMessageTime, end: nil, limit: 10)
  10. }
  11. }
  12.  
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement