UPGRADE YOUR SKILLS: Learn advanced Swift and SwiftUI on Hacking with Swift+! >>

Thoughts on full-screen background image across devices

Forums > iOS

Long time listener, first time caller.

We have an 12+ years old app where we have a full-screen background image. It's patterned, so a shift in proportions could look a bit weird, which we'd optimally don't want. We also want to make sure that it's crispier on devices, we're currently just using 2x/3x.

I've read around and there's a couple of approaches:

1 - Use many different images, set them manually depending on device. This would keep the image proportions exactly as desired, but a lot of work and needs to be maintained for new devices - not optimal.

2 - Which we're leaning towards. Have a single, sufficiently large png, say 1440X3200 or even larger, have the "background" viewcontroller ImageView use that image with view.imageNamed and set scaling to UIViewContentModeScaleAspectFill. I don't mind that it might require a tad more memory on "smaller" devices.

On SO there are tons of approaches, but i thought that i'd ask here instead:

Is there anything i haven't thought of, is there another, better, approach or would approach #2 above work ok?

Thoughts and tips appreciated!

3      

Hacking with Swift is sponsored by Essential Developer

SPONSORED Join a FREE crash course for mid/senior iOS devs who want to achieve an expert level of technical and practical skills – it’s the fast track to being a complete senior developer! Hurry up because it'll be available only until April 28th.

Click to save your free spot now

Sponsor Hacking with Swift and reach the world's largest Swift community!

Archived topic

This topic has been closed due to inactivity, so you can't reply. Please create a new topic if you need to.

All interactions here are governed by our code of conduct.

 
Unknown user

You are not logged in

Log in or create account
 

Link copied to your pasteboard.