0
我想在coreplot中執行多個動畫。然而Coreplot動畫與標識
-(void)animationDidFinish:(nonnull CPTAnimationOperation *)operation {
CPTPlotRange *newxRange = [CPTPlotRange
plotRangeWithLocation:@500
length:@100];
[self performSecondAnimationWithnewXRange:newXrange];}
我想,運行使用標識多個動畫: 要運行的第一個動畫我用:
[CPTAnimation animate:plotSpace
property:@"xRange"
fromPlotRange:oldXrange
toPlotRange:newxRange
duration:1.0
withDelay:0
animationCurve:CPTAnimationCurveCubicInOut
delegate:self];
和實施CPTAnimationDelegate
。我試過creatingPTAnimationOperation,但不知道如何啓動它:
CPTAnimationOperation* animation1 = [[CPTAnimationOperation alloc] init];
CPTAnimationPeriod *period = [CPTAnimationPeriod periodWithStartPlotRange:plotSpace.xRange
endPlotRange:newxRange
duration:3.0
withDelay:0.0];
animation1.identifier = @"animation1ID";
animation1.period = period;
如何真正開始動畫,所以委託我可以檢查它的ID?
一如既往,埃裏克的答案是最好的:D工作就像一個魅力。 – izik461