Skip to content
This repository has been archived by the owner on Oct 30, 2018. It is now read-only.

Update constraints in SLKTextInputBar on text view content size change #550

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
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
3 changes: 3 additions & 0 deletions Source/SLKTextInputbar.m
Original file line number Diff line number Diff line change
Expand Up @@ -578,6 +578,9 @@ - (void)slk_didChangeTextViewContentSize:(NSNotification *)notification
BOOL shouldHide = (self.textView.numberOfLines == 1) || self.editing;
self.charCountLabel.hidden = shouldHide;
}
dispatch_async(dispatch_get_main_queue(), ^{
Copy link

@dzenbot dzenbot Feb 17, 2017

Choose a reason for hiding this comment

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

I'm worried that we would be updating the constraints over and over at every content size update. I will need to test this before merging.

[self slk_updateConstraintConstants];
});
}

- (void)slk_didChangeContentSizeCategory:(NSNotification *)notification
Expand Down