Is there a special method to get iPhones orientation? I don\'t need it in degrees or radians, I want it to return an UIInterfaceOrientation object. I just need it for an if-else
With [UIApplication statusBarOrientation] being deprecated you should now use:
[UIApplication statusBarOrientation]
UIWindowScene *activeWindow = (UIWindowScene *)[[[UIApplication sharedApplication] windows] firstObject]; UIInterfaceOrientation orientation = [activeWindow interfaceOrientation] ?: UIInterfaceOrientationPortrait;