1

I rotate a UIImageView using the following code:

[imageView setTransform:CGAffineTransformMakeRotation(-0.10)];

but it looks blurry after the rotation, like this.

What's the problem?

Community
  • 1
  • 1
Vishal
  • 556
  • 4
  • 18

1 Answers1

0

It could be that the resulting frame isn't aligned on an even integer. When you are drawing on a half-pixel boundary, some of the drawing routines are going to make things look blurry. If you see any non-integer values, use one of the floor() functions to modify the resulting frame in order to snap it to a boundary.

Vlad Z.
  • 3,401
  • 3
  • 32
  • 60