IcaliaLabs / Presentr

Swift wrapper for custom ViewController presentations on iOS
MIT License
3.07k stars 270 forks source link

White background behind navigation bar #164

Open freesuraj opened 5 years ago

freesuraj commented 5 years ago

Latest version 1.9 swift 4.2 shows a white background by the navigation bar on a custom presentation that makes it look as if the navigation bar is taller by 100px. Upon debugging it is revealed that the background is actually a transition passthrough view.

var filterPresenter: Presentr {
        let fullHeight = UIScreen.main.bounds.height
        let maxHeight = min(440, fullHeight)
        let originY = max(0, fullHeight - maxHeight)
        let width = ModalSize.full
        let height = ModalSize.custom(size: Float(maxHeight))
        let center: ModalCenterPosition = .customOrigin(origin: .init(x: 0, y: originY))
        let customType = PresentationType.custom(width: width, height: height, center: center)

        let customPresenter = Presentr(presentationType: customType)
        customPresenter.transitionType = .coverVertical
        customPresenter.dismissTransitionType = .coverVertical
        customPresenter.dismissOnSwipe = false
        return customPresenter
    }

It's being presented using navigation controller like:

var filterVc = xxxx
customPresentViewController(filterPresenter, viewController: NavigationViewController(rootViewController: filterVc), animated: true, completion: nil)

The result looks like this:

image

Any idea?

dhipin commented 4 years ago

I am also having this same issue here when I use my NavigationController as rootviewcontroller. I guess there has been no updates to the repo for the past 2 years. image