Search code examples
iosuiviewcontrolleruinavigationcontroller

remove black background of UINavigationController


I've been adding a swipe to dismiss on the root ViewController of a UINavigationController, and it works, but as you're panning the view, there is a black background behind it. The UINavigationController is presented modally over another view, and I'd like to display the view that's underneath as the user pans, but I can't find a way to change the black background or where it is set on the UINavigationController. Does anyone know how I can change this?

Thanks...


Solution

  • I managed to get this working just by changing

    navController.modalPresentationStyle = UIModalPresentationStyle.fullScreen
    

    to

    navController.modalPresentationStyle = UIModalPresentationStyle.overCurrentContext