-1

当我尝试运行我的旋转方法时,我收到以下错误:

<Error>: CGContextRotateCTM: invalid context 0x0. This is a serious error. This application, or a library it uses, is using an invalid context and is thereby contributing to an overall degradation of system stability and reliability. This notice is a courtesy: please fix this problem. It will become a fatal error in an upcoming update.

旋转方法:

UIImage* rotate(UIImage* src, double degrees) {
    UIGraphicsBeginImageContext(src.size);
    CGContextRef context = UIGraphicsGetCurrentContext();
    CGContextRotateCTM (context, radians(degrees));
    [src drawAtPoint:CGPointMake(0, 0)];
    UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();
    return image;
}

你知道我做错了什么吗?

4

1 回答 1

0

要么图像为零

或者

它的大小为零。=> 空图像

于 2014-12-15T08:54:16.053 回答