Search code examples
iphonecore-animationantialiasing

iPhone Animation: how to anti-alias?


I was looking at some animations in my iPhone app and felt like it was kind of ugly. And then I undertsood it: it just doesn't animate through subpixel states.

So, in case I use usual +beginAnimations/+commitAnimations, moving some stuff just a few pixels look "jumpy". How can I avoid it? Are there any flags to make it animate through float coords or whatever?

Just to give you an idea of what I have and what I'm looking for, please refer to the picture:

alt text http://www.ptoing.net/subpixel_aa.gif

Thanks in advance, Anton


Solution

  • That's funny, but I found that UIImageView animate its content using aniti-aliasing, while edges of the view are not anti-aliased (hard). It seems to be because UIView itself should maintain the same bounds, while subpixel rendering might add to the bound a bit.

    So, I ended up just putting an image with some transparent space around the picture, and it all went smooth.

    Just don't let UIView cut its contents for you :)