テーブルセルにコンパスを作成しているので、リソース内の画像である位置から最初からやり直す画像ビューの回転に問題があります。
これは私のコードの一部です:
[UIView beginAnimations:nil context:nil];
[UIView setAnimationDuration:0.5];
[UIView setAnimationCurve:UIViewAnimationCurveEaseOut];
[UIView setAnimationDelegate:self];
if(cellValue.direction == 0){
cell.compass.transform = CGAffineTransformRotate(cell.compass.transform,DegreesToRadians([cellValue.fixedDirection floatValue]));
} else {
cell.compass.transform = CGAffineTransformRotate(cell.compass.transform,DegreesToRadians([cellValue.direction floatValue]));
}
[UIView commitAnimations];
cell.compassはUIimageViewであり、垂直方向の矢印の画像が含まれています。方向が0の場合、その程度になり、コンパスから角度を取得した後、else句に進みます。したがって、画像は、最後に回転した位置からではなく、その垂直位置から回転するようにスタートします。
最後に回転した位置を取得してそこから続行する方法
ありがとう!