emersonku
emersonku

Reputation: 149

Implement Pull to Refresh feature in Core Plot

Hi I want to implement the pull to refresh feature in CP so that I can reload data by using this gesture. I did some research that the apple built in gesture features rely on tableview or scrollview. Is it possible to make use of the Gesture Recognizers that have been built in the Core Plot library? Or is there any ready made methods within the CP? I saw some people put their CP within a scrollview but I guess that will make the performance worse?

Upvotes: 1

Views: 76

Answers (1)

Eric Skroch
Eric Skroch

Reputation: 27381

You can configure a graph to bounce back if the user pulls the plot past the global plot range (set allowsMomentum to YES on the plot space). However, this doesn't give you enough control of the bounce to pause it and display the spinner that is normally displayed during the refresh. You're better off embedding the graph in another view that handles the pull-to-refresh action.

Upvotes: 1

Related Questions