【发布时间】:2015-09-17 20:57:45
【问题描述】:
当用户放大和缩小时,我试图在图表上调整文本注释的大小和重新定位,但我真的不知道从哪里开始。
- (BOOL)plotSpace:(CPTPlotSpace *)space shouldScaleBy:(CGFloat)interactionScale aboutPoint:(CGPoint)interactionPoint {
NSArray *annotations = space.graph.plotAreaFrame.plotArea.annotations;
for (id annotation in annotations) {
if ([annotation isKindOfClass:[CPTPlotSpaceAnnotation class]]) {
CPTPlotSpaceAnnotation *textAnnotation = (CPTPlotSpaceAnnotation *)annotation;
if ([textAnnotation.contentLayer isKindOfClass:[CPTTextLayer class]]) {
// I want to resize font and reposition the annotation when the user zooms
}
}
}
return YES;
}
【问题讨论】:
标签: ios objective-c core-plot