Rotating and Moving a UIImageView (CocoaTouch)
- by yar
This code works to rotate:
CGAffineTransform transform = CGAffineTransformMakeRotation(radians(lastAngle++));
anImage.transform = transform;
and this code works to move my UIImageView
CGRect frame = [anImage frame];
frame.origin.x+=1;
frame.origin.y+=1;
[anImage setFrame:frame];
but when I combine them, the image stretches out increasingly on each run through. Perhaps the frame should not be modified like this?