samvermette/SVProgressHUD — Issue #21: Landscape issue with UIDevice orientation
Author: forcewill
Created: 2011-11-14 11:09:57+00:00
State: open

I was getting an incorrect background view showing the spinner (not covering all the view)

after some investigation i found out that UIInterfaceOrientationIsLandscape([[UIDevice currentDevice] orientation]) doesn't always give correct results: http://bynomial.com/blog/?p=25 it seems to give the device orientation and not the interface so i've changed it to the way three20 checks for landscape and works like a charm now:

UIDeviceOrientation orient = [UIApplication sharedApplication].statusBarOrientation;
if (UIDeviceOrientationUnknown == orient) {
return UIDeviceOrientationPortrait;

} else {
return orient;
}