зеркало из https://github.com/nextcloud/talk-ios.git
Update bottomSpacer when keyboard hides.
Signed-off-by: Ivan Sein <ivan@nextcloud.com>
This commit is contained in:
Родитель
3443d05285
Коммит
bf53d429db
|
@ -146,11 +146,8 @@
|
|||
NSBundle *bundle = [NSBundle bundleForClass:[ShareConfirmationCollectionViewCell class]];
|
||||
[self.shareCollectionView registerNib:[UINib nibWithNibName:kShareConfirmationTableCellNibName bundle:bundle] forCellWithReuseIdentifier:kShareConfirmationCellIdentifier];
|
||||
|
||||
[[NSNotificationCenter defaultCenter]
|
||||
addObserver:self
|
||||
selector:@selector(keyboardWillShow:)
|
||||
name:UIKeyboardWillShowNotification
|
||||
object:nil];
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardWillShow:) name:UIKeyboardWillShowNotification object:nil];
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardDidHide:) name:UIKeyboardDidHideNotification object:nil];
|
||||
|
||||
_type = ShareConfirmationTypeItem;
|
||||
}
|
||||
|
@ -185,6 +182,11 @@
|
|||
}];
|
||||
}
|
||||
|
||||
- (void)dealloc
|
||||
{
|
||||
[[NSNotificationCenter defaultCenter] removeObserver:self];
|
||||
}
|
||||
|
||||
#pragma mark - Button Actions
|
||||
|
||||
- (void)cancelButtonPressed
|
||||
|
@ -593,6 +595,14 @@
|
|||
}];
|
||||
}
|
||||
|
||||
-(void)keyboardDidHide:(NSNotification *)notification
|
||||
{
|
||||
[UIView animateWithDuration:0.3 animations:^{
|
||||
self.bottomSpacer.constant = 0;
|
||||
[self.view layoutIfNeeded];
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)updateToolbarForCurrentItem
|
||||
{
|
||||
ShareItem *item = [self getCurrentShareItem];
|
||||
|
|
Загрузка…
Ссылка в новой задаче