简体   繁体   中英

translate a CPTXYPlotSpace in ios using coreplot

I am new to core-plot and am a bit stuck. I have 2 plots in a single view. I am trying to make it so if the user drags or scales one of them, the other also gets dragged/scaled. The first plot is calling my CPTPlotSpaceDelegate in the event of a scale or drag using

-(BOOL)plotSpace:(CPTPlotSpace *)space shouldScaleBy:(CGFloat)interactionScale aboutPoint:(CGPoint)interactionPoint

and

-(CGPoint)plotSpace:(CPTPlotSpace *)space willDisplaceBy:(CGPoint)proposedDisplacementVector

respectively.

I am just unsure how to get my second plot to translate/scale in conjunction with these events. Does anyone have any thoughts on how this might be approached?

Thanks in advance!

If you can use the same plot space for both plots, do that. In that case, they'll move together with no additional effort on your part.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM