Sfoglia il codice sorgente

Dropbox: do not show back for root directory on iPad (closes #9016)

Gleb Pinigin 12 anni fa
parent
commit
2df23bbe08
1 ha cambiato i file con 3 aggiunte e 2 eliminazioni
  1. 3 2
      AspenProject/VLCDropboxTableViewController.m

+ 3 - 2
AspenProject/VLCDropboxTableViewController.m

@@ -54,7 +54,8 @@
     self.navigationItem.titleView.contentMode = UIViewContentModeScaleAspectFit;
 
     _backButton = [UIBarButtonItem themedBackButtonWithTarget:self andSelector:@selector(goBack:)];
-    self.navigationItem.leftBarButtonItem = _backButton;
+    if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone)
+        self.navigationItem.leftBarButtonItem = _backButton;
 
     self.tableView.rowHeight = [VLCDropboxTableViewCell heightOfCell];
     self.tableView.separatorColor = [UIColor colorWithWhite:.122 alpha:1.];
@@ -115,7 +116,7 @@
     [_dropboxController requestDirectoryListingAtPath:_currentPath];
 
     if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
-        _backButton.enabled = ![_currentPath isEqualToString:@"/"];
+        self.navigationItem.leftBarButtonItem = ![_currentPath isEqualToString:@"/"]? _backButton: nil;
 }
 
 #pragma mark - interface interaction