We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9821203 commit fff2793Copy full SHA for fff2793
1 file changed
Sources/GradientMaker/GradientMaker.swift
@@ -66,7 +66,7 @@ private class ColorPickerChooser {
66
picker.view.leftAnchor.constraint(equalTo: viewController.view.leftAnchor).isActive = true
67
picker.view.rightAnchor.constraint(equalTo: viewController.view.rightAnchor).isActive = true
68
picker.view.heightAnchor.constraint(equalToConstant: 650).isActive = true
69
- if offsetY > UIScreen.main.bounds.size.height * 0.5 { // below mid-screen
+ if let on = on, offsetY > on.view.frame.size.height * 0.5 { // below mid-screen
70
picker.view.topAnchor.constraint(equalTo: viewController.view.safeAreaLayoutGuide.topAnchor, constant: 50).isActive = true
71
} else { // above mid-screen
72
picker.view.topAnchor.constraint(equalTo: viewController.view.topAnchor, constant: offsetY).isActive = true
0 commit comments