0

my issue can be seen in the below video:
https://www.dropbox.com/s/cql7r7b49lgffh9/navbarissue.mov

I have the following storyboard setup:enter image description here

To describe the problem in words...when the app loads it pushes revealviewcont>navcont>tabbarcont>navcont>firstviewcont. On the firstviewcont, the reveal menu button exists. Clicking this shows the slide out menu with numerous options in a table. Clicking the first cell returns you to the firstviewcont. However, when the firstviewcont is pushed from the menucont it creates a new navigation bar above the old one, thus rendering two nav bars. I assume this is because I'm going back through the stack, tabbarcont>navcont>firstviewcont. Attaching the segue to the firstview's nav controller is not supported, and attaching it to the firstviewcont does not display the Tab Bar.

I have tried hiding the navbar from viewwilldisappear and viewwillappear methods on the mentioned view controllers without success...how could I achieve returning to the firstviewcont while preserving the tab bar and displaying only one navigation bar?

4

2 回答 2

1

我通过阅读 SWRevealViewController.h 文件上的更改日志解决了这个问题。

- Took a cleaner approach to storyboard support. SWRevealViewControllerSegue is now 
deprecated and you should use SWRevealViewControllerSegueSetController and 
SWRevealViewControllerSeguePushController instead.

将我的 segue 更改为新版本的故事板 segue 解决了我的问题。

感谢伟大的子类 John LLuch!

于 2014-07-28T04:18:59.120 回答
0

我尝试使用标识符为“sw_front”的 SWRevealViewControllerSegueSetController 并通过删除旧的导航控制器将嵌入在导航控制器中应用到视图控制器,然后它工作正常 iOS 11。如果你想要前/中心视图的导航栏将导航控制器添加到你的视图控制器并将 segue 连接到导航控制器所以它在前视图或后 vc 上显示导航栏。

于 2018-01-27T08:30:19.620 回答