Skip to content

Commit fff2793

Browse files
committed
not using uiscreen
1 parent 9821203 commit fff2793

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Sources/GradientMaker/GradientMaker.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ private class ColorPickerChooser {
6666
picker.view.leftAnchor.constraint(equalTo: viewController.view.leftAnchor).isActive = true
6767
picker.view.rightAnchor.constraint(equalTo: viewController.view.rightAnchor).isActive = true
6868
picker.view.heightAnchor.constraint(equalToConstant: 650).isActive = true
69-
if offsetY > UIScreen.main.bounds.size.height * 0.5 { // below mid-screen
69+
if let on = on, offsetY > on.view.frame.size.height * 0.5 { // below mid-screen
7070
picker.view.topAnchor.constraint(equalTo: viewController.view.safeAreaLayoutGuide.topAnchor, constant: 50).isActive = true
7171
} else { // above mid-screen
7272
picker.view.topAnchor.constraint(equalTo: viewController.view.topAnchor, constant: offsetY).isActive = true

0 commit comments

Comments
 (0)