1

在我的应用程序中有一个图像视图,我在其中执行两项操作: 1. 反映图像:

-(无效)反射图像{

UIImage *alterImage=[[UIImage alloc]init];
alterImage=photoView.image;
UIImageOrientation flippedOrientation = alterImage.imageOrientation;
if (flippedOrientation==UIImageOrientationUp) {
    flippedOrientation = UIImageOrientationDownMirrored;

}
else if (flippedOrientation==UIImageOrientationDown) {
    flippedOrientation = UIImageOrientationUpMirrored;

}
else if (flippedOrientation==UIImageOrientationDownMirrored) {
    flippedOrientation = UIImageOrientationUp;

}
else if (flippedOrientation==UIImageOrientationUpMirrored) {
    flippedOrientation = UIImageOrientationDown;

}
UIImage * flippedImage = [UIImage imageWithCGImage:alterImage.CGImage scale:alterImage.scale orientation:flippedOrientation];
photoView.image=flippedImage;

}

和 2. 简单图像:

-(IBAction)getSimpleImage:(id)sender{


    [photoView setImage:simpleImage];


}

simpleImage 是原始图像。当我反射图像并取回原始图像时,应用程序崩溃了。它显示错误为“程序接收信号sigterm”。

4

0 回答 0