UIView not scaling to iPad retina

∥☆過路亽.° 提交于 2019-12-08 10:38:23

问题


I'm updating my app to work with the iPad retina display, but for some reason one of my views doesn't want to scale to 2x. As you can see in the screenshot, the text on the button on the left scales properly, while the text on the right still display the fonts in low resolution. (The gray bg is still low res, but I'm working on that).

I'm adding the ViewControllers as children of the main controller correctly, and the views also follow the same hierarchy.

Thanks!


回答1:


I figured out the problem. For some reason the contentScaleFactor is not being set properly in the subview. Setting it manually did the trick:

self.reportsController.view.contentScaleFactor = [UIScreen mainScreen].scale;


来源:https://stackoverflow.com/questions/9771000/uiview-not-scaling-to-ipad-retina

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!