فهرست منبع

coding - test

marinofaggiana 4 سال پیش
والد
کامیت
6442cf546f
1فایلهای تغییر یافته به همراه6 افزوده شده و 1 حذف شده
  1. 6 1
      iOSClient/Utility/NCPopupViewController.swift

+ 6 - 1
iOSClient/Utility/NCPopupViewController.swift

@@ -191,8 +191,13 @@ public class NCPopupViewController: UIViewController {
                 }
                 
                 if keyboardPosizionEnabled {
+                    
+                    var y2 = screenSize.height - (popupHeight ?? 0)
+                    if y2 < 0 { y2 = 0 }
+                    let diff = abs(y2 - keyboardSize.height)
+                    
                     if centerYConstraint != nil {
-                        centerYConstraint?.constant = -(keyboardSize.height/2)
+                        centerYConstraint?.constant = -(diff + 10)
                     }
                 }
             }