Affine Transform and UIView's Frame vs. Center propertyPosted in iPhone Objective C development on August 05, 2010 by Pavel Sich When using affine transform to rotate views (UIIMageView in most cases, right?) for example like this: CGAffineTransform transform = CGAffineTransformMakeRotation(-b->GetAngle()); oneView.transform = transform;
Make sure you then translate the object using its center property and not using the frame property, as frame is already affected by the affine transform and your image would be corrupted. Happy coding!
|
