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:
Please be sure to test these changes thoroughly as these images are used in many locations in Swiftfin.
UIScreen.main.scaleis 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 ofUIScreen.main.scalewith@Environment(\.displayScale).Below are all of the locations where
UIScreen.main.scaleexists:Please be sure to test these changes thoroughly as these images are used in many locations in Swiftfin.