iPhone 4 图像本地与服务器?
所以我一直在研究如何处理iPhone屏幕的不同分辨率。在文档中,可以在此处找到: https://developer.apple.com/iphone/library/documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/SupportingResolutionIndependence/SupportingResolutionIndependence.html#//apple_ref/doc/uid/TP40007072-CH10
他们说,使用命名约定并将资产数量加倍是可行的方法。这对于本地图像来说一切都很好,但没有讨论如何从服务器获取图像。 在从服务器提取适当的图像之前,我是否只需要查询设备分辨率?难道就这么简单吗?
So I have been doing some research on how to handle the different resolutions of iPhone screens. In the documention, found here: https://developer.apple.com/iphone/library/documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/SupportingResolutionIndependence/SupportingResolutionIndependence.html#//apple_ref/doc/uid/TP40007072-CH10
They say that using a naming convention and doubling your number of assets is how to do it. This is all well and good for local images, but Doesn't discuss how to get images from a server.
Do I just need to query the device resolution before I pull the appropriate image from the server? Is it just that simple?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
iPhone 4 的像素是旧设备的两倍。如果您希望图像在 iPhone 4 上清晰,则图像的像素必须是原来的两倍。所以,就是这样,您测试一下,看看是哪个设备,然后以正确的分辨率拉取图像。
iPhone 4 has twice as pixels as older devices. Your image has to have twice as pixels if you want the image to be crisp on iPhone 4. So, that's it, you test to see which device is there and pull the image on the proper resolution.