First use mas_safeAreaLayoutGuideBottom to setup, then use mas_bottom to update constrains, animation not work, but if use mas_safeAreaLayoutGuideBottom the animation is ok. happened in keyboard show/hide animation.
- (void)handleKeyboardWillShow:(NSNotification *)noti {
CGRect endFrame = [[noti.userInfo valueForKey:UIKeyboardFrameEndUserInfoKey] CGRectValue];
CGFloat height = endFrame.size.height;
[UIView animateWithDuration:duration animations:^{
[self.sendView mas_updateConstraints:^(MASConstraintMaker *make) {
// use mas_bottom because of iPhone x home indicator gap
// see image below if use mas_safeAreaLayoutGuideBottom here
make.bottom.equalTo(wself.view.mas_bottom).offset(-height);
}];
[self.view layoutIfNeeded];
}];
}
Issue Info
Issue Description
First use
mas_safeAreaLayoutGuideBottom
to setup, then usemas_bottom
to update constrains, animation not work, but if usemas_safeAreaLayoutGuideBottom
the animation is ok. happened in keyboard show/hide animation.