CosmicMind / CosmicMind/Material

Notch covering left view controller in NavigationDrawerController under specific circumstances

Open
#1,279 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Swift
Stars
12k
Forks
1.3k
PR merge metrics
No merged PRs in 30d

Description

## 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.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the issue in NavigationDrawerController on the iPhone X simulator with iOS 11.0.1, following the rotation and menu-opening steps. Compare portrait and landscape safe-area insets for the left view controller, and consider the issue done when the content is not covered by the notch or given an incorrect inset after rotation.

Written by the indexing model from the issue text.

Assessment

Tech stack
ios, swift
Domain
mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.