0

I have an UITableView with TabBar (BottomBar) and ToolBar. When selecting a cell the detailsView is push to the stack. The detailsView does not have a TabBar nor a ToolBar. This is done within the prepareForSegue method:

...
if ([segue.identifier isEqualToString:@"ShowDetails"])
{
    ...
    editDetailsViewController.hidesBottomBarWhenPushed = YES;    // for hiding the TabBar
    [self.navigationController setToolbarHidden:YES];   // for hiding the toolbar
}

Now everything work fine but when the cell is selected the ToolBar is switched off immediately in the table view immediately before the detailsView is shown. How do I prevent that behavior? The ToolBar and TabBar should move together without switching off either of them?

Thanks!

4

2 回答 2

1

这部分很好:

...
if ([segue.identifier isEqualToString:@"ShowDetails"])
{
    ...
    editDetailsViewController.hidesBottomBarWhenPushed = YES;    // for hiding the TabBar
}

但是,prepareForSegue在推送之前调用。

如果您希望工具栏通过动画隐藏,您应该实现自定义 UISegueUIToolbar在过渡中设置动画。

于 2013-06-30T10:37:19.937 回答
0

我认为你应该评论这一行。

[self.navigationController setToolbarHidden:YES];

然后再试一次。

于 2013-06-30T10:30:40.847 回答