Just had a major breakthrough with a stupid API on iPhone.
You see, if you set an image on a UIButton, and then rotate said button, you end up with a nasty jagged edge along the top only!

This had been bothering me ever since Stack 1.0, and I'd never thought to investigate. The actual problem is the clipping rect used by the system is sharp and aliased. However, if you move your images down just a single pixel in Y, you fix it!
An albeit verbose way of setting an image to a button, I used:

As a result, I now have smooth icons =)

NB: Jailbreak developers: For the record, do *not* use the [UIImage drawAtPoint:] API, it leaves garbage at the side of the image. Use the official drawAtPoint:blendMode:alpha: and you'll be alright.
This is officially my favourite new feature in Stack v2.1.
14 comments: