Have seen a lot of solutions to check the orientation, but strangely, none works!!
Below is the code snippet,
override func viewWillTransition(to size: C
This may be because viewWillTransition executes before the view actually flips. If you do a simple print("height width \(view.frame.height) \(view.frame.width)") inside the viewWillTransition block you will see.
viewWillTransition
print("height width \(view.frame.height) \(view.frame.width)")