search

Home  >  Q&A  >  body text

objective-c - ios 隐藏navigationBar之后右滑手势失效问题

ios 隐藏navigationBar之后右滑手势失效了。
然后google了下 解决方法
self.navigationController.interactivePopGestureRecognizer.delegate = (id) self;
手势可以了,但是返回去的页面navigationBar消失了
这个怎么解决?

黄舟黄舟2766 days ago423

reply all(3)I'll reply

  • 巴扎黑

    巴扎黑2017-04-24 09:14:34

    Check to see if it is written on the interface you return to
    self.navigationController.navigationBarHidden = NO;

    reply
    0
  • PHP中文网

    PHP中文网2017-04-24 09:14:34

    The action of hiding the navigationBar will hide the navigationBar of all ViewControllers under the navigationBar.
    (In fact, a more accurate statement is that navigationController only maintains one navigationBar).

    If the process under navigationController wants to dynamically hide the navigationBar,
    A better way is to hide the navigationBar of the navigationController itself,
    Then each interface creates and maintains its own navigationBar.

    reply
    0
  • 迷茫

    迷茫2017-04-24 09:14:34

    In viewWillAppear of the returned Viewcontroller

    self.navigationController.navigationBarHidden = NO;
    

    reply
    0
  • Cancelreply