ContentScaleFactor on UIKit elements broken?

I am trying to make sure that my UILabel and UITextView remain sharp when they exist in the UIScrollView. I came up with the contentScaleFactor property in the UIView class, it seems to work fine in the user drawing, but the UITextView and shortcuts just refuse to redraw themselves in the right content scale.

http://pastebin.com/PBjhjMbR

Perhaps this is due to the fact that the actual representations that draw the text are subtype for these classes?

+1
source share
1 answer

You need to set the recursiveness of the contentScaleFactor in all the subqueries, and also call setNeedsDisplay for each view you set to make them better. I also found that you should not install it on UIImageView, because in any case they will not demonstrate higher quality, so it makes no sense to waste memory, increasing their support levels.

+1
source

Source: https://habr.com/ru/post/1486730/


All Articles