We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c71a27b commit 21c44dbCopy full SHA for 21c44db
Sources/Impl/Coordinates.swift
@@ -108,7 +108,12 @@ final class Coordinates<PinView: Layoutable> {
108
109
private func getDisplayScale() -> CGFloat {
110
#if os(iOS) || os(tvOS)
111
+ if #available(iOS 13.0, *) {
112
+ let windowScene = UIApplication.shared.connectedScenes.first as? UIWindowScene
113
+ return windowScene?.screen.scale ?? .zero
114
+ } else {
115
return UIScreen.main.scale
116
+ }
117
#elseif os(OSX)
118
#if swift(>=4.1)
119
return NSScreen.main?.backingScaleFactor ?? 2.0
0 commit comments