私のアプリには、2 つの操作を実行している画像ビューがあります: 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.SimpleImage:
-(IBAction)getSimpleImage:(id)sender{
[photoView setImage:simpleImage];
}
simpleImage は元の画像です。画像を反映して元の画像に戻すと、アプリがクラッシュします。「プログラム受信信号 sigterm」とエラー表示しています。