diff --git a/src/FBDialog.h b/src/FBDialog.h index 870ef13d4b..b8d4f2011f 100644 --- a/src/FBDialog.h +++ b/src/FBDialog.h @@ -33,7 +33,7 @@ UIWebView* _webView; UIActivityIndicatorView* _spinner; UIButton* _closeButton; - UIDeviceOrientation _orientation; + UIInterfaceOrientation _orientation; BOOL _showingKeyboard; // Ensures that UI elements behind the dialog are disabled. diff --git a/src/FBDialog.m b/src/FBDialog.m index 078422a102..e87e9f7091 100644 --- a/src/FBDialog.m +++ b/src/FBDialog.m @@ -31,7 +31,7 @@ /////////////////////////////////////////////////////////////////////////////////////////////////// -BOOL FBIsDeviceIPad() { +static BOOL FBIsDeviceIPad() { #if __IPHONE_OS_VERSION_MAX_ALLOWED >= 30200 if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) { return YES; @@ -129,14 +129,14 @@ - (void)strokeLines:(CGRect)rect stroke:(const CGFloat*)strokeColor { CGColorSpaceRelease(space); } -- (BOOL)shouldRotateToOrientation:(UIDeviceOrientation)orientation { +- (BOOL)shouldRotateToOrientation:(UIInterfaceOrientation)orientation { if (orientation == _orientation) { return NO; } else { - return orientation == UIDeviceOrientationLandscapeLeft - || orientation == UIDeviceOrientationLandscapeRight - || orientation == UIDeviceOrientationPortrait - || orientation == UIDeviceOrientationPortraitUpsideDown; + return orientation == UIInterfaceOrientationPortrait + || orientation == UIInterfaceOrientationPortraitUpsideDown + || orientation == UIInterfaceOrientationLandscapeLeft + || orientation == UIInterfaceOrientationLandscapeRight; } } @@ -290,7 +290,6 @@ - (id)init { if (self == [super initWithFrame:CGRectZero]) { _delegate = nil; _loadingURL = nil; - _orientation = UIDeviceOrientationUnknown; _showingKeyboard = NO; self.backgroundColor = [UIColor clearColor]; @@ -419,7 +418,7 @@ - (void)webView:(UIWebView *)webView didFailLoadWithError:(NSError *)error { // UIDeviceOrientationDidChangeNotification - (void)deviceOrientationDidChange:(void*)object { - UIDeviceOrientation orientation = [UIApplication sharedApplication].statusBarOrientation; + UIInterfaceOrientation orientation = [UIApplication sharedApplication].statusBarOrientation; if (!_showingKeyboard && [self shouldRotateToOrientation:orientation]) { [self updateWebOrientation];