UIPopoverController not dismissed when opened from self.navigationItem (inside UINavigationController)

前端 未结 4 1694
醉话见心
醉话见心 2021-01-24 21:06

I have a problem dismissing a popover that was launched from the navigationItem of a UINavigationController. It seems that the navigation item which is inserted by the UINavigat

4条回答
  •  無奈伤痛
    2021-01-24 21:55

    There might be a better solution than this, but why not only add the UITapGestureRecognizer to the navBar whenever the popover is open? Once you tap the button to open the popover, add the TapGestureRecogniser to the navBar. Once you dismiss the popover, remove the TapGestureRecogniser from the navBar.

提交回复
热议问题