소스 검색

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)
                     }
                 }
             }