Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //This method allows users to query for more messages by dragging down from the top.
- func scrollViewDidScroll(_ scrollView: UIScrollView){
- //If we are not loading more messages already
- if(!loadingMore){
- //-40 is when you have dragged down from the top of all the messages
- if(scrollView.contentOffset.y < -40 ) {
- loadingMore = true
- addHistory(start: earliestMessageTime, end: nil, limit: 10)
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement