tags:

views:

43

answers:

1

I'm testing one of my iPhone apps on my iPad in "2x" mode, so it stretches everything to double-size. I've noticed that some text appears to be smoother than others. From my (limited) testing, text in a UITextView or UITextField that is being edited (has keyboard focus) is smoother than a plain UILabel hanging out in a view. I'm not sure if it's anti-aliasing in 2x2 pixel blocks still, or just that it uses all the pixels to draw the letters rather than treating them as 2x2 pixel blocks, or something else entirely. From my testing, this appears to be true regardless of font size.

Does anyone know what is going on here?

And, more importantly, is there a way to control this? It looks much better and I'd like to have my plain UILabels drawn this way too! I'm hoping that a future iOS update will allow the iPad to use iPhone 4 "@2x" resources and font drawing when running an iPhone app in 2x mode, that would make them look much better!

Thanks!

+1  A: 

iPad's legacy scaling mode obeys CALayer's magnificationFilter property. Use kCAFilterLinear for smoothed/blurry upscaling, and kCAFilterNearest for blocky/crisp upscaling.

Also, if you set the contents property to be a CGImage that is double-sized, QuartzCore will gladly take advantage of the extra resolution.

rpetrich
Thanks for the info! This gives me more to look into.
Mike Kale