CGAffineTransformMakeTranslation and CGAffineTransformScale are converted to ios7 and ios8

I have a UITableView in a viewcontroller and want to zoom out in the viewController control center. It works fine in ios7, just like the following code:

CGSize appSize = [[UIScreen mainScreen] applicationFrame].size;
CGAffineTransform affineMatrix = CGAffineTransformMakeTranslation(appSize.width/2, 20);
affineMatrix = CGAffineTransformScale(affineMatrix, 0.5, 0.5);
self.transform = affineMatrix;


after upgrading to ios8 the code might like that it works fine, but in ios7 it doesn't work:

CGAffineTransform affineMatrix = CGAffineTransformMakeScale(0.5, 0.5);
affineMatrix = CGAffineTransformConcat(affineMatrix,CGAffineTransformMakeTranslation(0, -appSize.height/2+40));
self.transform = affineMatrix;


who can explain why? How can I work fine in the same code?


source to share

1 answer

See article

It explains the affine conversions bug in iOS7. For simple words, you need to manually convert points to pixels on retina devices on iOS 7 using[UIScreen mainScreen].scale



All Articles