I'm just learning how tab bar controllers and nav controllers work together. I have the following storyboard but I've also experimented with nav controllers too but can't seem to make things work how I want:
我只是学习标签栏控制器和导航控制器如何协同工作。我有以下故事板,但我也尝试过导航控制器,但似乎无法使我的工作方式如何:
I have added a segue between the table cell and the "detail view" view controller. However, the transition isn't what I want as it slides up from the bottom. I would like it to slide from right to left. I select "push" but it still slides from the bottom.
我在表格单元格和“详细视图”视图控制器之间添加了一个segue。然而,从底部向上滑动,过渡不是我想要的。我希望它从右向左滑动。我选择“推”但它仍然从底部滑动。
In addition, I would like the table view to have the tab bar (which it does) but I don't want the "detail view" to have a tab bar (or nav bar and status bar).
另外,我希望表视图有标签栏(它可以),但我不希望“详细视图”有标签栏(或导航栏和状态栏)。
1 个解决方案
#1
2
Your architecture would be like :
你的架构就像:
TabBarController - NavigationController -TableViewController - DetailViewController
TabBarController - NavigationController -TableViewController - DetailViewController
For hiding bottom tabbar on detail just set hidesBottomBarOnPush = true
on the instance of DetailViewController
.Currently your DetailViewController
is not pushing because there is no NavigationController
to add them up in stack as you want.
为了隐藏详细信息的底部tabbar,只需在DetailViewController的实例上设置hidesBottomBarOnPush = true。当前你的DetailViewController没有推送,因为没有NavigationController可以根据需要将它们添加到堆栈中。
self.navigationController?.isNavigationBarHidden = true
UIApplication.shared.isStatusBarHidden = true
For hiding particulars as you queried.
用于隐藏您查询的详细信息。
#1
2
Your architecture would be like :
你的架构就像:
TabBarController - NavigationController -TableViewController - DetailViewController
TabBarController - NavigationController -TableViewController - DetailViewController
For hiding bottom tabbar on detail just set hidesBottomBarOnPush = true
on the instance of DetailViewController
.Currently your DetailViewController
is not pushing because there is no NavigationController
to add them up in stack as you want.
为了隐藏详细信息的底部tabbar,只需在DetailViewController的实例上设置hidesBottomBarOnPush = true。当前你的DetailViewController没有推送,因为没有NavigationController可以根据需要将它们添加到堆栈中。
self.navigationController?.isNavigationBarHidden = true
UIApplication.shared.isStatusBarHidden = true
For hiding particulars as you queried.
用于隐藏您查询的详细信息。