Full screen iOS background image for all screen sizes

I am trying to set a background image for my application, which will scale to fit 4, 4.7 and 5.5 inch screens.

  • I work in Xcode 6 at a speed
  • I created a 640 x 1136 image and pasted the @ 1x, @ 2x and @ 3x images into the images.xcasetts folder. I chose the zoom mode for the image.
  • I created UIImage in the main.storyboard file for a 4-inch screen. This image perfectly fills the screen when creating.
  • I think I tried almost every combination of height / width / aspect ratio restrictions with no luck.
+5
source share
2 answers

4 and 4.7 use @ 2x, 5.5 used @ 3x, see screenshot details.

Screen shot

You can download the PDF file that is the source of this screenshot from Ugur Akdemir Dribble .

+10
source

You can use this solution: http://codemotionapps.com/get-assets-ready-ios8-iphone-6-plus/

.

I created a vector gradient in the free Inkscape editor and exported to PDF (my PDF file size is 4Kb). Then I add this PDF to Images.xcassets in my project and select it. In Attributes, the inspector selects Single Vector for the scaling factors. When the application is compiled, PDF creates PNG for all permissions nesesery @ 1x, @ 2x, @ 3x and others :-)

0
source

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


All Articles