You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ag...@apache.org on 2013/09/10 15:54:32 UTC
ios commit: CDVViewController: Fix KeyboardShrinksView on iOS 7
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 <ch...@gmail.com>
Authored: Tue Sep 3 03:06:28 2013 +0200
Committer: Andrew Grieve <ag...@chromium.org>
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