Browse Source

Fix dialog rotation for Network Stream, HTTP Download, Dropbox and About on iOS 5 (close #8992)

Felix Paul Kühne 12 years ago
parent
commit
15c6475c6e

+ 7 - 0
AspenProject/VLCAboutViewController.m

@@ -37,6 +37,13 @@
     self.webView.delegate = self;
 }
 
+- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation
+{
+    if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone && toInterfaceOrientation == UIInterfaceOrientationPortraitUpsideDown)
+        return NO;
+    return YES;
+}
+
 - (IBAction)goBack:(id)sender
 {
     [self.navigationController popViewControllerAnimated:YES];

+ 9 - 0
AspenProject/VLCDropboxTableViewController.m

@@ -116,6 +116,15 @@
         _backButton.enabled = ![_currentPath isEqualToString:@"/"];
 }
 
+#pragma mark - interface interaction
+
+- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation
+{
+    if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone && toInterfaceOrientation == UIInterfaceOrientationPortraitUpsideDown)
+        return NO;
+    return YES;
+}
+
 - (IBAction)goBack:(id)sender
 {
     if (![_currentPath isEqualToString:@"/"]) {

+ 7 - 0
AspenProject/VLCHTTPDownloadViewController.m

@@ -47,6 +47,13 @@
 }
 
 #pragma mark - UI interaction
+- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation
+{
+    if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone && toInterfaceOrientation == UIInterfaceOrientationPortraitUpsideDown)
+        return NO;
+    return YES;
+}
+
 - (IBAction)goBack:(id)sender
 {
     [self.navigationController popViewControllerAnimated:YES];

+ 7 - 0
AspenProject/VLCOpenNetworkStreamViewController.m

@@ -75,6 +75,13 @@
 }
 
 #pragma mark - UI interaction
+- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation
+{
+    if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone && toInterfaceOrientation == UIInterfaceOrientationPortraitUpsideDown)
+        return NO;
+    return YES;
+}
+
 - (IBAction)goBack:(id)sender
 {
     [self.navigationController popViewControllerAnimated:YES];