3

我知道此代码UINavigationController仅供参考。

[self.navigationController setNavigationBarHidden:YES animated:YES];
4

2 回答 2

9

使用块的示例。这将隐藏 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;
                 }];
于 2012-09-20T20:55:05.350 回答
1

Here is the Code:

[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];

you can modify the toolBar 'y' origin.

于 2012-02-27T06:40:50.360 回答