UITableview avoid top pulling

 Problem:

I want to avoid the top pulling in UITableview but bottom to top scroll wants.


Solution:

  func scrollViewDidScroll(_ scrollView: UIScrollView) {

            if scrollView.contentOffset.y < 0 {

                scrollView.contentOffset.y = 0

            }

        }


Comments

Popular posts from this blog

Invalid bundle error while upload the app to the app Store

Saved Image in document directory and save path in coredata not able to fetch the image file iOS swift