Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- - (void)keyboardWillShow:(NSNotification *)notification {
- [self.view layoutIfNeeded];
- CGSize keyboardSize = [[[notification userInfo] objectForKey:UIKeyboardFrameEndUserInfoKey] CGRectValue].size;
- self.postButtonBotConstraint.constant = keyboardSize.height;
- [UIView animateWithDuration:[notification.userInfo[UIKeyboardAnimationDurationUserInfoKey] doubleValue] delay:0.0 options:[notification.userInfo[UIKeyboardAnimationCurveUserInfoKey] integerValue] << 16 animations:^{
- [self.view layoutIfNeeded];
- } completion:nil];
- }
- - (void)keyboardWillBeHidden:(NSNotification *)notification {
- self.postButtonBotConstraint.constant = 0;
- [UIView animateWithDuration:[notification.userInfo[UIKeyboardAnimationDurationUserInfoKey] doubleValue] delay:0.0 options:[notification.userInfo[UIKeyboardAnimationCurveUserInfoKey] integerValue] << 16 animations:^{
- [self.view layoutIfNeeded];
- } completion:nil];
- // [self.scrollView setContentOffset:(CGPoint){0, 0} animated:YES];
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement