From 767ecb91987caf0b27e979a37bfccc67a66a0157 Mon Sep 17 00:00:00 2001 From: Ayaka Nonaka Date: Wed, 9 Jul 2014 18:12:21 -0700 Subject: [PATCH] Fix issue where input field is scrolling unnecessarily --- VENTokenField/VENTokenField.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/VENTokenField/VENTokenField.m b/VENTokenField/VENTokenField.m index 20d680c..8bac8ad 100644 --- a/VENTokenField/VENTokenField.m +++ b/VENTokenField/VENTokenField.m @@ -273,13 +273,13 @@ - (void)adjustHeightForCurrentY:(CGFloat)currentY { if (currentY + [self heightForToken] > CGRectGetHeight(self.frame)) { // needs to grow if (currentY + [self heightForToken] <= self.maxHeight) { - [self setHeight:currentY + [self heightForToken]]; + [self setHeight:currentY + [self heightForToken] + self.verticalInset * 2]; } else { [self setHeight:self.maxHeight]; } } else { // needs to shrink if (currentY + [self heightForToken] > self.originalHeight) { - [self setHeight:currentY + [self heightForToken]]; + [self setHeight:currentY + [self heightForToken] + self.verticalInset * 2]; } else { [self setHeight:self.originalHeight]; }