CoreGraphics --- 翻转坐标系

1. 由于CoreGraphics 的坐标系与手机屏幕坐标系的Y轴是相反的, 所以在我们开发的时候, 需要翻转坐标系;

- (void)drawRect:(CGRect)rect
{
    CGContextRef context = UIGraphicsGetCurrentContext();
    CGContextTranslateCTM(context, 0, self.height);
    CGContextTranslateCTM(context, 1.0f, -1.0f);
    [self.viewToMagnify.layer renderInContext:context];
}
原文地址:https://www.cnblogs.com/guangleijia/p/5086452.html