好的,所以我意识到我可以从图层的CATransform3D中找到比例值,如下所示:

 float scale = [[layer valueForKeyPath: @"transform.scale"] floatValue];

但是我无法终生想出如何从CGAffineTransform中找到比例值。举例来说,我有一个名为“cameraTransform”的CGAffineTransform:
UIImagePickerController *imagePicker = [[UIImagePickerController alloc] init];
CGAffineTransform *cameraTransform =  imagePicker.cameraViewTransform;

现在如何从cameraTransform获取比例值?

最佳答案

The Quartz 2D Programming Guide tells you where to find the scale values.the definition of the CGAffineTransform structure进行比较。

10-08 17:48