• <tfoot id='ZVWhz'></tfoot>

  • <small id='ZVWhz'></small><noframes id='ZVWhz'>

      <bdo id='ZVWhz'></bdo><ul id='ZVWhz'></ul>
    <legend id='ZVWhz'><style id='ZVWhz'><dir id='ZVWhz'><q id='ZVWhz'></q></dir></style></legend>

      <i id='ZVWhz'><tr id='ZVWhz'><dt id='ZVWhz'><q id='ZVWhz'><span id='ZVWhz'><b id='ZVWhz'><form id='ZVWhz'><ins id='ZVWhz'></ins><ul id='ZVWhz'></ul><sub id='ZVWhz'></sub></form><legend id='ZVWhz'></legend><bdo id='ZVWhz'><pre id='ZVWhz'><center id='ZVWhz'></center></pre></bdo></b><th id='ZVWhz'></th></span></q></dt></tr></i><div id='ZVWhz'><tfoot id='ZVWhz'></tfoot><dl id='ZVWhz'><fieldset id='ZVWhz'></fieldset></dl></div>
      1. 在 UINavigationController 中隐藏导航栏时不向后滑动

        时间:2023-05-17

        <small id='dy4QJ'></small><noframes id='dy4QJ'>

          <i id='dy4QJ'><tr id='dy4QJ'><dt id='dy4QJ'><q id='dy4QJ'><span id='dy4QJ'><b id='dy4QJ'><form id='dy4QJ'><ins id='dy4QJ'></ins><ul id='dy4QJ'></ul><sub id='dy4QJ'></sub></form><legend id='dy4QJ'></legend><bdo id='dy4QJ'><pre id='dy4QJ'><center id='dy4QJ'></center></pre></bdo></b><th id='dy4QJ'></th></span></q></dt></tr></i><div id='dy4QJ'><tfoot id='dy4QJ'></tfoot><dl id='dy4QJ'><fieldset id='dy4QJ'></fieldset></dl></div>

          <tfoot id='dy4QJ'></tfoot>
          • <legend id='dy4QJ'><style id='dy4QJ'><dir id='dy4QJ'><q id='dy4QJ'></q></dir></style></legend>

                • <bdo id='dy4QJ'></bdo><ul id='dy4QJ'></ul>
                    <tbody id='dy4QJ'></tbody>

                  本文介绍了在 UINavigationController 中隐藏导航栏时不向后滑动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  限时送ChatGPT账号..

                  我喜欢将视图嵌入到 UINavigationController 中继承的滑动包.不幸的是,我似乎无法找到隐藏 NavigationBar 的方法,但仍然让触摸屏向后滑动 gesture.我可以编写自定义手势,但我不喜欢而是依赖 UINavigationController 向后滑动 gesture.

                  I love the swipe pack thats inherited from embedding your views in a UINavigationController. Unfortunately i cannot seem to find a way to hide the NavigationBar but still have the touch pan swipe back gesture. I can write custom gestures but I prefer not to and to rely on the UINavigationController back swipe gesture instead.

                  如果我在情节提要中取消选中它,则向后滑动不起作用

                  if I uncheck it in the storyboard, the back swipe doesn't work

                  或者,如果我以编程方式隐藏它,同样的场景.

                  alternatively if I programmatically hide it, the same scenario.

                  - (void)viewDidLoad
                  {
                      [super viewDidLoad];
                      [self.navigationController setNavigationBarHidden:YES animated:NO]; // and animated:YES
                  }
                  

                  有没有办法隐藏顶部 NavigationBar 仍然可以滑动?

                  Is there no way to hide the top NavigationBar and still have the swipe?

                  推荐答案

                  一个可行的方法是将 interactivePopGestureRecognizerUINavigationController 委托设置为 nil 像这样:

                  A hack that is working is to set the interactivePopGestureRecognizer's delegate of the UINavigationController to nil like this:

                  [self.navigationController.interactivePopGestureRecognizer setDelegate:nil];
                  

                  但在某些情况下,它可能会产生奇怪的效果.

                  But in some situations it could create strange effects.

                  这篇关于在 UINavigationController 中隐藏导航栏时不向后滑动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:如何在 Swift 编程中获得基于导航的模板功能 下一篇:UINavigationController“pushViewController:animated"的完成处

                  相关文章

                      <tfoot id='BBmqZ'></tfoot>
                      • <bdo id='BBmqZ'></bdo><ul id='BBmqZ'></ul>

                      <small id='BBmqZ'></small><noframes id='BBmqZ'>

                      <i id='BBmqZ'><tr id='BBmqZ'><dt id='BBmqZ'><q id='BBmqZ'><span id='BBmqZ'><b id='BBmqZ'><form id='BBmqZ'><ins id='BBmqZ'></ins><ul id='BBmqZ'></ul><sub id='BBmqZ'></sub></form><legend id='BBmqZ'></legend><bdo id='BBmqZ'><pre id='BBmqZ'><center id='BBmqZ'></center></pre></bdo></b><th id='BBmqZ'></th></span></q></dt></tr></i><div id='BBmqZ'><tfoot id='BBmqZ'></tfoot><dl id='BBmqZ'><fieldset id='BBmqZ'></fieldset></dl></div>

                      <legend id='BBmqZ'><style id='BBmqZ'><dir id='BBmqZ'><q id='BBmqZ'></q></dir></style></legend>