[英]iOS full screen background image for all screen sizes
I'm trying to set a background image for my app that will scale to fill the 4, 4.7, and 5.5 inch screens. 我正在尝试为我的应用设置一个背景图像,可以缩放以填充4,4.7和5.5英寸的屏幕。
The 4 and 4.7 use @2x, 5.5 used @3x, please see the screenshot detail. 4和4.7使用@ 2x,5.5使用@ 3x,请参阅屏幕截图详细信息。
You can download the PDF that is the origin of this screenshot from Ugur Akdemir's Dribble . 您可以从Ugur Akdemir的Dribble下载作为此屏幕截图原点的PDF。
You can use this solution: http://codemotionapps.com/get-assets-ready-ios8-iphone-6-plus/ 您可以使用此解决方案: http : //codemotionapps.com/get-assets-ready-ios8-iphone-6-plus/
I created vector gradient in free Inkscape editor and export to PDF (my PDF file size is 4Kb). 我在免费的Inkscape编辑器中创建了矢量渐变并导出为PDF(我的PDF文件大小为4Kb)。 Then I add this PDF to Images.xcassets in my project and selected it.
然后我将此PDF添加到我的项目中的Images.xcassets并选择它。 In Attributes inspector for Scale Factors choose Single Vector.
在“比例因子”的“属性”检查器中,选择“单向量” When the app is compiled the PDF generates PNGs for all nesesery resolutions @1x, @2x, @3x and others :-)
编译应用程序时,PDF会为所有nesesery分辨率@ 1x,@ 2x,@ 3x和其他人生成PNG :-)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.