I want to put a margin / padding top if the device is iOS and has notch.
And I want to do it from the generic code not using the specific iOS project.
I've been looking for a lot and I think I can not check if it has notch and not know if it's an iPhone X, so...
- I can not know the model of the device
- I can not know if the device has notch
- Can I know the height and orientation of the device?
If possible I could do the following:
if (
(Device.RuntimePlatform == Device.iOS) // Ok
&& (check orientation == portrait)
&& (check height device == XXXX)
){
Padding = new Thickness(0, 20, 0, 0);
}