Answers for "swift scroll bottom how to konw"

0

swift collection view check if you are at the bottom

func scrollViewDidScroll(_ scrollView: UIScrollView) {
    let height = scrollView.frame.size.height
    let contentYoffset = scrollView.contentOffset.y
    let distanceFromBottom = scrollView.contentSize.height - contentYoffset
    if distanceFromBottom < height {
        print(" you reached end of the table")
    }
}
Posted by: Guest on August-13-2020

Code answers related to "swift scroll bottom how to konw"

Code answers related to "Swift"

Browse Popular Code Answers by Language