Updated Branches:
  refs/heads/master 14cbc89ae -> 70b568512

CDVViewController: Fix KeyboardShrinksView on iOS 7

From: https://github.com/apache/cordova-ios/pull/74


Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/70b56851
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/70b56851
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/70b56851

Branch: refs/heads/master
Commit: 70b5685120b5ed4d9dde785b814e78b90ba4314b
Parents: 14cbc89
Author: cpojer <[email protected]>
Authored: Tue Sep 3 03:06:28 2013 +0200
Committer: Andrew Grieve <[email protected]>
Committed: Tue Sep 10 09:52:59 2013 -0400

----------------------------------------------------------------------
 CordovaLib/Classes/CDVViewController.m | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/70b56851/CordovaLib/Classes/CDVViewController.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVViewController.m 
b/CordovaLib/Classes/CDVViewController.m
index 0fc0b5c..6facdc1 100644
--- a/CordovaLib/Classes/CDVViewController.m
+++ b/CordovaLib/Classes/CDVViewController.m
@@ -145,9 +145,11 @@
     CGRect newFrame = self.view.bounds;
     if (showEvent) {
         newFrame.size.height -= keyboardFrame.size.height;
+        self.webView.scrollView.contentInset = UIEdgeInsetsMake(0, 0, 
-keyboardFrame.size.height, 0);
+    } else {
+        self.webView.scrollView.contentInset = UIEdgeInsetsMake(0, 0, 0, 0);
     }
     self.webView.frame = newFrame;
-    self.webView.scrollView.contentInset = UIEdgeInsetsMake(0, 0, 
-keyboardFrame.size.height, 0);
 }
 
 - (void)printDeprecationNotice

Reply via email to