Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed bug where screen would 'bounce' when presenting in a modal dialog ... #37

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
6 changes: 5 additions & 1 deletion VENTokenField/VENTokenField.m
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,11 @@ - (void)layoutTokensAndInputWithFrameAdjustment:(BOOL)shouldAdjustFrame
{
[self.collapsedLabel removeFromSuperview];
BOOL inputFieldShouldBecomeFirstResponder = self.inputTextField.isFirstResponder;
[self.scrollView.subviews makeObjectsPerformSelector:@selector(removeFromSuperview)];
[self.scrollView.subviews enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) {
if (obj == self.inputTextField) return;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey, thanks for the pull-request. Instead of early return, can it be:

if (obj != self.inputTextField) {
    [obj removeFromSuperview];
}

:octocat:


[obj removeFromSuperview];
}];
self.scrollView.hidden = NO;
[self removeGestureRecognizer:self.tapGestureRecognizer];

Expand Down