kawoou / KWDrawerController

Drawer view controller that easy to use!
MIT License
157 stars 32 forks source link

When closing a side panel presented using DrawerFloatTransition, the primary view is sometimes re-presented offset to the left #20

Closed ttupper92618 closed 6 years ago

ttupper92618 commented 6 years ago

When closing a side panel that has been presented using a DrawerFloatTransition, the main view controller is not always restored properly and is instead drawn offset to the left by approximately 30 pixels. This creates a visual defect in the UI. Subsequent open / close of the side panel will exacerbate the situation, eventually causing the primary view to become unusable.

See images below:

one two three

kawoou commented 6 years ago

Is this an issue only on iPhone X?

kawoou commented 6 years ago

It's not an X problem. Under what circumstances?

ttupper92618 commented 6 years ago

Not iPhone X only - it is however MUCH worse on an iPhone X. I can typically trigger it very infrequently on devices like 6S, etc. by opening and closing the left VC repeatedly. It happens virtually every time on an iPhone X. But I cannot find a 100% path for reproducing it; it seems to happen when actuating the left VC using a button action:

@IBAction func auiShowNav(_ sender: UIButton) {
        self.drawerController?.setTransition(DrawerFloatTransition(), for: .left)
        self.drawerController?.setOverflowTransition(DrawerFloatTransition(), for: .left)
        self.drawerController?.openSide(.left)
        auiOcclusionMask.isHidden = false       
}