IOS text rendering after enlargement

I wrote a function to increase the UIView using CGAffineTransformScale. After 2x enlargement, all the text looks really blurry. Images are fine if they are in higher resolution. Is there a way to redisplay all text in the correct resolution after zooming in?

Edit: I found a partial solution to my problem: http://markpospesel.wordpress.com/2012/04/03/on-the-importance-of-setting-contentscalefactor-in-catiledlayer-backed-views/

  • (void) didMoveToWindow {self.contentScaleFactor = 2.0; }

By adding the method above in the categories UIView, UILabel, UIButton and most other views are now displayed in high resolution. However, this does not affect the UITextView or UIWebView. The text in either of these two representations is still fuzzy.

So a new question: how can a UITextView or UIWebView be redrawn with high resolution after zooming?

+5
source share
1 answer

Yes. You can install contentScaleFactoron your UIView to make it display a reverse view with a higher resolution. Caution on retinal devices; you want your new contentScaleFactorone to be at least yours [[UIScreen mainScreen] scale]. (I would set this in front of your animation to make it smooth.)

: , , , contentScaleFactor [[UIScreen mainScreen] scale] * 2 2x .

+7

All Articles