From 641332029b473234fd8aec7333d6e988b903e726 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Fri, 22 Dec 2017 03:05:06 +0300 Subject: No need to animate textview resize --- Juick/Main.storyboard | 2 +- Juick/ViewControllers/NewPostViewController.m | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) (limited to 'Juick') diff --git a/Juick/Main.storyboard b/Juick/Main.storyboard index 130f09d..5c8cc68 100644 --- a/Juick/Main.storyboard +++ b/Juick/Main.storyboard @@ -300,6 +300,6 @@ - + diff --git a/Juick/ViewControllers/NewPostViewController.m b/Juick/ViewControllers/NewPostViewController.m index e8c767c..02d810b 100644 --- a/Juick/ViewControllers/NewPostViewController.m +++ b/Juick/ViewControllers/NewPostViewController.m @@ -66,10 +66,8 @@ -(void) keyboardDidShow:(NSNotification *)sender { CGRect keyboardRect = [sender.userInfo[UIKeyboardFrameEndUserInfoKey] CGRectValue]; - [UIView animateWithDuration:[sender.userInfo[UIKeyboardAnimationDurationUserInfoKey] doubleValue] animations:^{ - self.bottomConstraint.constant = keyboardRect.size.height - self.view.safeAreaInsets.bottom + self.paddingValue; - [self.view layoutIfNeeded]; - }]; + self.bottomConstraint.constant = keyboardRect.size.height - self.view.safeAreaInsets.bottom + self.paddingValue; + [self.view layoutIfNeeded]; } -(void) keyboardWillHide:(NSNotification *)sender { self.bottomConstraint.constant = self.paddingValue; -- cgit v1.2.3