Skip to content

Commit

Permalink
Merge pull request #279 from ElonPark/fix-get-display-scale
Browse files Browse the repository at this point in the history
fix: fix getDisplayScale
  • Loading branch information
lucdion authored Jan 22, 2024
2 parents 8eaa3a1 + a60afbe commit babea9c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/Impl/Coordinates.swift
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ final class Coordinates<PinView: Layoutable> {
private func getDisplayScale() -> CGFloat {
#if os(iOS) || os(tvOS)
if #available(iOS 13.0, tvOS 13.0, *) {
return UITraitCollection.current.displayScale
return max(UITraitCollection.current.displayScale, 1)
} else {
return UIScreen.main.scale
}
Expand Down

0 comments on commit babea9c

Please sign in to comment.