Skip to content
This repository has been archived by the owner on Dec 2, 2020. It is now read-only.

Graph Snapshots

Boris-Em edited this page Jun 10, 2014 · 6 revisions

On iOS 7.0 and above you can take a snapshot of the line graph view and get a UIImage representation of the snapshot. To do so, simply call the method graphSnapshotImage at anytime in the graph's lifecycle.
Note that the snapshot is not of the completed graph, but of the graph in its current state (whether it is in mid-animation or not). You can use the lineGraphDidFinishLoading: delegate method to find out when the graph has finished rendering and animating.

Here is an example on how to use it:

- (void)lineGraphDidFinishLoading {
    UIImage *imageOfGraph = [self.myGraph graphSnapshotImage];
}