我的项目在 Mac OSX 10.10/10.9 上运行良好,但在 10.11 中使用以下代码无法正常运行:
[(PDFAnnotationInk*)_activeAnnotation removeBezierPath:_path];
[_activeAnnotation setBounds:bound];
// Lazy, redraw entire view.
NSAffineTransform* transform = [NSAffineTransform transform];
[transform translateXBy:-bound.origin.x yBy:-bound.origin.y];
[_path transformUsingAffineTransform:transform];
[(PDFAnnotationInk*)_activeAnnotation addBezierPath:_path];
[[_activeAnnotation page] removeAnnotation: _activeAnnotation];
[self addAnnotationSelector:_activeAnnotation];
当我改变这个 [transform translateXBy:-bound.origin.x yBy:-bound.origin.y];
至
[转换 translateXBy:bound.origin.x yBy:bound.origin.y];
该应用程序在 OSX 10.11 上正常工作,但在 OSX 10.10/10.9 上不正确...
我不知道为什么,NSAffineTransform 在最新的 Mac OS X 10.11 中是否有不同的坐标系?如何解决此问题以使应用程序与 10.10/9 和 10.11 兼容?谢谢。