【问题标题】:SWRevealViewController switching between ViewControllersSWRevealViewController 在 ViewController 之间切换
【发布时间】:2017-05-05 13:28:42
【问题描述】:

SWRevealViewController 有问题。在我的应用程序中,我有一长串 UIViewControllers 连接到单个 UINavigationController。添加侧边菜单并为单元格设置“显示视图控制器推送控制器”转场后,我只看到ViewControllers 与转场连接。我不能再在链中的UIViewControllers 之间移动了。并且缺少导航栏。是否可以同时使用侧边栏和UINavigationBar

【问题讨论】:

  • 你能分享你的“故事板图片”,以便我能更好地帮助你
  • 当然。为了更好地理解,我做了一些笔记。 drive.google.com/file/d/…
  • 您是否在属性检查器中使用过。顶栏(不透明的导航栏)?
  • 安萨里博物馆,是的,我做到了
  • 请检查我的情况screencast.com/t/2OHQHjjFpXSj 并在选择行方法if indexPath.row == 0 { if let lvc = self.storyboard?.instantiateViewController(withIdentifier: "TabViewController") as? TabViewController { self.revealViewController().setFront(lvc, animated: true) self.revealViewController().setFrontViewPosition(FrontViewPosition.left, animated: true) } } 中像这样调用

标签: ios swift uiviewcontroller uinavigationcontroller swrevealviewcontroller


【解决方案1】:

我看到你的图片我认为你必须在 C****** S****** View Controller 或你想去的视图控制器之前添加另一个导航控制器
原因是C****** S****** View Controller之前没有UINavigationController,所以导航栏被隐藏了,你不能移动

【讨论】:

  • 我已经尝试过这样做。我可以转到链中的下一个“ViewController”,但我没有“返回”按钮
  • 你必须实现你的后退按钮
  • 对不起,我在界面生成器中检查了文档大纲,并且我在导航项中有返回按钮,但它是不可见的。我怎样才能让它活跃起来?
  • 如果它不可见,您可以创建您的 Try This UIBarButtonItem * button = [[UIBarButtonItem alloc]initWithTitle:@"Back" style:UIBarButtonItemStylePlain target:self action:@selector(buttonAction:)]; self.navigationItem.leftBarButtonItem = button; -(void)buttonAction:(UIButton *)sender{ NSLog(@"Button Pressed"); }
  • 或者如果你想在 Swift 中使用这个代码或者你想用 Image 改变标题然后问我
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2016-07-27
  • 2015-01-23
  • 2012-05-02
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2017-11-30
相关资源
最近更新 更多