Я знаю, что этот код доступен только для UINavigationController
.Можно ли скрыть UIToolbar анимацией?
[self.navigationController setNavigationBarHidden:YES animated:YES];
Я знаю, что этот код доступен только для UINavigationController
.Можно ли скрыть UIToolbar анимацией?
[self.navigationController setNavigationBarHidden:YES animated:YES];
Вот код:
[UIView beginAnimations:@"hideView" context:nil];
[UIView setAnimationDuration:0.7];
[UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];
[UIView setAnimationTransition:UIViewAnimationTransitionNone forView:toolBar cache:YES];
toolbarFrame.origin.y = 380;
toolBar.frame = toolbarFrame;
[UIView commitAnimations];
вы можете изменить панели инструментов 'у' происхождение.
Пример использования блоков. Это скроет панель инструментов в верхней части экрана iPad.
[UIView animateWithDuration:.7
animations:^(void)
{
CGRect toolbarFrame = self.toolbar.frame;
toolbarFrame.origin.y = -44; // moves iPad Toolbar off screen
self.toolbar.frame = toolbarFrame;
}
completion:^(BOOL finished)
{
self.toolbar.hidden = YES;
}];