Skip to content

Commit

Permalink
Merge pull request #30 from mkutgt72/master
Browse files Browse the repository at this point in the history
Check interface orientation.
  • Loading branch information
Brandon McQuilkin committed Apr 20, 2014
2 parents 1585a91 + 6284bd3 commit 131c4f1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Classes/HUD/M13ProgressHUD.m
Original file line number Diff line number Diff line change
Expand Up @@ -384,8 +384,9 @@ - (void)unregisterFromNotificationCenter {
}

- (void)deviceOrientationDidChange:(NSNotification *)notification {
if (_shouldAutorotate) {
UIDeviceOrientation deviceOrientation = [notification.object orientation];
UIDeviceOrientation deviceOrientation = [notification.object orientation];

if (_shouldAutorotate && UIDeviceOrientationIsValidInterfaceOrientation(deviceOrientation)) {
if (UIDeviceOrientationIsPortrait(deviceOrientation)) {
if (deviceOrientation == UIDeviceOrientationPortraitUpsideDown) {
_orientation = UIInterfaceOrientationPortraitUpsideDown;
Expand Down

0 comments on commit 131c4f1

Please sign in to comment.