GO FURTHER, FASTER: Try the Swift Career Accelerator today! >>

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      

Go further, faster with the Swift Career Accelerator.

GO FURTHER, FASTER Unleash your full potential as a Swift developer with the all-new Swift Career Accelerator: the most comprehensive, career-transforming learning resource ever created for iOS development. Whether you’re just starting out, looking to land your first job, or aiming to become a lead developer, this program offers everything you need to level up – from mastering Swift’s latest features to conquering interview questions and building robust portfolios.

Learn more here

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.