私はこのコードが利用できることを知っていますUINavigationController
。
[self.navigationController setNavigationBarHidden:YES animated:YES];
私はこのコードが利用できることを知っていますUINavigationController
。
[self.navigationController setNavigationBarHidden:YES animated:YES];
ブロックを使った例。これにより、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;
}];
コードは次のとおりです。
[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];
toolBar'y'の原点を変更できます。