This repository was archived by the owner on Aug 24, 2019. It is now read-only.

Description
I'm currently using SAMTextView in a full-screen modal. Whenever the keyboard appears or disappears, I animate the updated constraint. While the animation is taking the place, the placeholder text shrinks while the resize is taking place but then is redrawn after the animation is complete. I've attached a snippet of code which causes the issue.
- (void)keyboardWillShow:(NSNotification *)note {
NSDictionary *userInfo = [note userInfo];
CGRect keyboardFrame = [userInfo[UIKeyboardFrameEndUserInfoKey] CGRectValue];
// Check if the constraint is the same as what it is about to be set to, and abort if it is.
if (self.descriptionBottomConstraint.constant == -(keyboardFrame.size.height)) {
return;
}
double animationDuration = [((NSNumber *)userInfo[UIKeyboardAnimationDurationUserInfoKey]) doubleValue];
[self.view layoutIfNeeded];
self.descriptionBottomConstraint.constant = -(keyboardFrame.size.height);
[UIView animateWithDuration:animationDuration animations:^{
[self.view layoutIfNeeded];
}];
}