CosmicMind/Material

Notch covering left view controller in NavigationDrawerController under specific circumstances

MarkBorazio opened this issue · 0 comments

Description

I am finding that my left view controller is having it's content sometimes covered by the notch.
I am observing this on the iPhone X simulator, iOS 11.0.1.

Steps To Reproduce:

  1. Open app
  2. Go to screen where left menu can be opened
  3. Rotate device counter-clockwise 90°
  4. Open left menu

I have double-checked, and yes, I have constrained the content of left view controller to the safe area on all sides. If the left menu is open and the device is rotated, this issue does not occur. In fact, this will even fix the issue.

The opposite will also happen, where if the device is in landscape and the notch is not covering the left view controller content, then rotating back to regular portrait mode and opening the left menu will show a larger inset than normal.

I briefly attempted to fix the issue by detecting when the orientation changed and calling setNeedsLayout() on the left, root, and right viewControllers, but this did not work.

I assume this also occurs for the right view controller, although that is untested.