You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by GitBox <gi...@apache.org> on 2018/12/11 10:56:25 UTC

[GitHub] vuthanhict commented on issue #417: Keyboard Dismissal Leaves Viewport Shifted in iOS 12 / XCode 10

vuthanhict commented on issue #417: Keyboard Dismissal Leaves Viewport Shifted in iOS 12 / XCode 10
URL: https://github.com/apache/cordova-ios/issues/417#issuecomment-446160479
 
 
   if #available(iOS 11.0, *) {
               self.webView.scrollView.contentInsetAdjustmentBehavior = .never
   } else {
               self.automaticallyAdjustsScrollViewInsets = false
   }
   
   And UIScrollViewDelegate
   
   func scrollViewDidChangeAdjustedContentInset(_ scrollView: UIScrollView) {
           Logger.print("scrollViewDidChangeAdjustedContentInset")
           if #available(iOS 12.0, *) {
               for view in webView.subviews {
                   if let scrollView = view as? UIScrollView {
                       scrollView.setContentOffset(.zero, animated: true)
                   }
               }
           }
       }

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org