Reputation: 2406
i have set up graph with core plot, i want to move/ scroll it continuously left to right circularly. if it was uiview it was like
[UIView animateWithDuration:10.0f
delay:0.0f
options: UIViewAnimationOptionRepeat | UIViewAnimationOptionAutoreverse | UIViewAnimationOptionBeginFromCurrentState
animations: ^(void){// animation/ frame set
}
completion:NULL];
Any other solution is also appreciated to scroll graph automatic with out user interaction.
Upvotes: 0
Views: 444
Reputation: 53407
In coreplot you can use CPTAnimation like so:
zoomInAnimation = [CPTAnimation animate: plotSpace
property: @"xRange"
fromPlotRange: plotSpace.xRange
toPlotRange: plotRange
duration: ANIMATION_TIME
withDelay: 0
animationCurve: CPTAnimationCurveCubicInOut
delegate: self];
Lookup CPTAnimation to see how to animate other properties (decimals, float etc.).
Upvotes: 3