Swift Bits: Display Scale
Screen data the right way
While actively coding, it’s typical to face warnings and try to resolve them. It’s not just a fancy habit, but a way to reduce tech debt and extra compilation time. Who isn’t dreaming about zero(0, totally no) warnings during compilation? Honestly?!
Over the years, Apple has been shifting toward a multi-scene architecture. We saw the migration away from AppDelegate in SwiftUI, which finally led to using the right tools for screen info tracking. One of the most vital pieces of data is display scale. Have you ever seen an image with really low resolution quality on a 3x scale device? That’s exactly what happens when scale isn’t handled correctly.
Sharing new ways to get it in both UIKit and SwiftUI.
Useful links:


