From 46e10fccd7a037149e8e71d3da00fecbbda569fa Mon Sep 17 00:00:00 2001 From: Antti Laitala Date: Wed, 27 Nov 2013 08:39:39 +0200 Subject: [PATCH] Fixed #70. --- TPKeyboardAvoiding/UIScrollView+TPKeyboardAvoidingAdditions.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TPKeyboardAvoiding/UIScrollView+TPKeyboardAvoidingAdditions.m b/TPKeyboardAvoiding/UIScrollView+TPKeyboardAvoidingAdditions.m index f05a86c1..00fdd60e 100644 --- a/TPKeyboardAvoiding/UIScrollView+TPKeyboardAvoidingAdditions.m +++ b/TPKeyboardAvoiding/UIScrollView+TPKeyboardAvoidingAdditions.m @@ -206,7 +206,7 @@ - (UIEdgeInsets)TPKeyboardAvoiding_contentInsetForKeyboard { TPKeyboardAvoidingState *state = self.keyboardAvoidingState; UIEdgeInsets newInset = self.contentInset; CGRect keyboardRect = state.keyboardRect; - newInset.bottom = keyboardRect.size.height - (CGRectGetMaxY(keyboardRect) - CGRectGetMaxY(self.bounds)); + newInset.bottom = keyboardRect.size.height - (CGRectGetMaxY(keyboardRect) - self.bounds.size.height); return newInset; }