Swift – UIDevice orientations using iOS12

In introduced a new way to check if your is in “” mode, or better is on your desk.

Let’s take a look at the reference:

https://developer.apple.com/documentation/uikit/uideviceorientation/2981866-isflat

A Boolean value indicating whether the specified is face up or face down.