如何确保 UIView -drawRect: 正在使用 1.0f 的 contentScaleFactor 进行绘制?
我已经实现了 -drawRect: 来绘制一些东西,并且我不希望该绘制发生在视网膜显示屏上的较大位图上。如何确保该位图在所有设备上始终完全相同?
我尝试在初始值中设置 self.contentScaleFactor = 1.0f;
但这没有帮助。系统似乎自动将其更改回 2.0f...在我的 NSLog 中我不断收到
内容比例因子 = 2.0f
如何确保它是 1.0f?
I've implemented -drawRect: to draw something, and I don't want that this drawing happens on a larger bitmap on the retina display. How can I make sure that this bitmap is always exactly the same across all devices?
I tried to set self.contentScaleFactor = 1.0f;
in the initialzier but that didn't help. The system seems to change this back to 2.0f automatically... In my NSLog I keep getting
contentScaleFactor = 2.0f
How to make sure it's 1.0f?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
可能有点晚了,但如果有人需要的话......
Probably a bit late, but if anyone needed...