iPhone portrait mode detecting the notch.
-
Hi, is there a way I can detect the notch that is used on the newer versions of the iPhone?
For example if the phone has the notch I will add some different CSS than if the phone doesn’t have it.
Thanks in advance.
-
PS, I should have mention I only need portrait mode.
-
How about
ons.platform.isIPhoneX
?https://onsen.io/v2/api/vue/$ons.platform.html#method-isIPhoneX
Contrary to the naming, this will return true for iPhone X, XS, XS Max, XR, 11, 11 Pro, 11 Pro Max, 12 Mini, 12, 12 Pro or 12 Pro Max.