CosmicMind / Material

A UI/UX framework for creating beautiful applications.
http://cosmicmind.com
MIT License
11.99k stars 1.26k forks source link

Notch covering left view controller in NavigationDrawerController under specific circumstances #1279

Open MarkBorazio opened 5 years ago

MarkBorazio commented 5 years ago

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.