Can we implement pull to refresh feature on a custom view controller?. My view controller is not a table view controller and I want to refresh this view on pulling the screen down. How can I implement this feature?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
In short, you need to do the following:
UIScrollView.CGRectMake(0, -30, 320, 30)for a 30pt-tall indicator view.–scrollViewDidScroll:to update your “Pull to Refresh” view as the user is dragging.–scrollViewDidEndDragging:willDecelerate:to checkscrollView.contentOffsetwhen the dragging ends. If it’s beyond your threshold for refreshing, then do the refresh.