public override UIInterfaceOrientationMask GetSupportedInterfaceOrientations() { return UIInterfaceOrientationMask.Portrait | UIInterfaceOrientationMask.PortraitUpsideDown; }
var currentOrientation = UIApplication.SharedApplication.StatusBarOrientation;This code retrieves the current interface orientation of the app's status bar. Package Library: UIKit (iOS SDK) UIInterfaceOrientation is part of the UIKit framework, which is a standard library included in the iOS SDK.