0

I am curios about faceUp, faceDown landScape orientation in swift 4.2 perviously there were helpers methods to check faceUp, faceDown in landscape orientation. Any one know about the alternative of this helper function. Thanks in Advance.

UIDeviceOrientationIsLandscape(orientation) 
Ashley Mills
  • 50,474
  • 16
  • 129
  • 160
Muhammad Shauket
  • 2,643
  • 19
  • 40

2 Answers2

3

i Fixed my problem using status bar orientation.

if UIApplication.shared.statusBarOrientation == .landscapeLeft || UIApplication.shared.statusBarOrientation == .landscapeRight || UIApplication.shared.statusBarOrientation.isLandscape { return true} 

So if you are using UIDeviceOrientationIsLandscape this function you can replace it with above code.

Muhammad Shauket
  • 2,643
  • 19
  • 40
0

I've made some searches and the replacement for:

UIDeviceOrientationIsLandscape(orientation) 

is

UIDevice.current.orientation.isLandscape
Iosif
  • 353
  • 2
  • 15