Skip to content

Replace UIScreen.main.scale Usages #1809

@JPKribs

Description

@JPKribs

UIScreen.main.scale is being deprecated because SwiftUI manages layout responsively and provides the screen’s pixel density via the @Environment(\.displayScale) property, eliminating the need for global screen queries. We need to find and replace all instances of UIScreen.main.scale with @Environment(\.displayScale).

Below are all of the locations where UIScreen.main.scale exists:


Image

Please be sure to test these changes thoroughly as these images are used in many locations in Swiftfin.

Metadata

Metadata

Assignees

No one assigned

    Labels

    developerAlters the developer experienceiOSImpacts iOS or iPadOStvOSImpacts tvOS

    Type

    Projects

    Status

    In-Progress

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions