Returns a Boolean value indicating whether the user interface is currently presented in a portrait orientation.
- iOS 8.3+
Specify the orientation constant to check.
YES if the interface orientation is portrait, otherwise returns
The interface orientation can be different than the device orientation. You typically call this function in your view controller code to check the current orientation.