使用TabBar和SlideMenu的iOS应用程序

时间:2018-05-23 12:57:52

标签: swift tabbar

我想在整个应用程序中同时拥有导航菜单(幻灯片菜单)和tabbar。我正在使用库SWReveal。我设法得到了两个,但目前我的布局似乎相当愚蠢。请参阅附件。Image of my storyboard showing how the tab view controller creates a tab for each swrevealviewcontroller

当我浏览每个SWRevealviewcontroller时,我只能添加一个tabbar。我似乎无法给标签栏控制器提供swrevealcontroller视图,以便使用我的幻灯片菜单填充所有其他视图。每次有新页面时,我是否真的必须创建SWReveal控制器及其相应的表视图?

2 个答案:

答案 0 :(得分:1)

在我过去的项目中,我也使用了SWRevielViewController。我面临很多方向问题。根据您的要求,使用containerView处理事情会更好。 1.使用ContainerView创建ParentController。 2.使用ui导航创建父控制器选项卡栏并管理显示选项卡索引和容器视图子项。

供您参考,您可以看到此回购 - https://github.com/amrittrivedir/CustomTabBar

对于swift,您可以使用此演示 - https://drive.google.com/open?id=1faFagqDZwpfRN7lzDPknQAeWGvhx3271

答案 1 :(得分:1)

不需要为每个标签创建SWRevealController。您可以创建SWRevealController并添加到14:12:54.599 [pool-1-thread-1] INFO com.intuit.karate - ******************************* null 14:12:54.827 [pool-1-thread-1] ERROR com.intuit.karate - url not set, please refer to the keyword documentation for 'url' 14:12:54.827 [pool-1-thread-1] ERROR com.intuit.karate - http request failed: url not set, please refer to the keyword documentation for 'url' 14:12:54.836 [pool-1-thread-1] INFO c.i.karate.cucumber.CucumberRunner - <<<< feature 1 of 1 on thread pool-1-thread-1: com/guidewire/lifecycle/controller/configuration-controller.feature 14:12:55.359 [Test worker] INFO n.m.cucumber.ReportParser - File '/workspace/configuration-service/configuration-infrastructure/app-backend/lifecycle/target/surefire-reports/TEST-com.guidewire.lifecycle.controller.configuration-controller.json' contain 1 features 。它适用于您创建的所有标签。

你可以做我的项目:

步骤1:使用类UItabViewController创建UIViewController。

步骤2:创建UITableViewController,并使用标识符SWRevealViewController制作SWRevealViewController storyboard segue。

步骤3:创建UITabViewController并使标识为sw_rear

SWRevealViewController storyboard segue

enter image description here

您可以参考以下链接,我回答了同一时间的问题并详细说明: https://stackoverflow.com/a/44780371/5094664