From 59ad155cb74198ee5cac9aaa429d1cb124d4488f Mon Sep 17 00:00:00 2001 From: Gautier Pelloux-Prayer Date: Fri, 2 Oct 2015 17:00:26 +0200 Subject: [PATCH] HPGrowingTextView: fix 2nd line of chat not displaying properly when building with xcode7 for ioS9 by rounding to upper value --- Classes/Utils/GrowingTextView/HPGrowingTextView.m | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/Classes/Utils/GrowingTextView/HPGrowingTextView.m b/Classes/Utils/GrowingTextView/HPGrowingTextView.m index f8c143f9c..ba747064c 100755 --- a/Classes/Utils/GrowingTextView/HPGrowingTextView.m +++ b/Classes/Utils/GrowingTextView/HPGrowingTextView.m @@ -366,13 +366,11 @@ CGRect size = [textToMeasure boundingRectWithSize:CGSizeMake(CGRectGetWidth(frame), MAXFLOAT) options:NSStringDrawingUsesLineFragmentOrigin context:nil]; - - return CGRectGetHeight(size) + fudgeFactor.height; - } - else - { - return self.internalTextView.contentSize.height; - } + + return ceil(CGRectGetHeight(size) + fudgeFactor.height); + } else { + return self.internalTextView.contentSize.height; + } #else return self.internalTextView.contentSize.height; #endif