Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Copy Markdown
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