Browse Source

playlist: make sure that the mini playback controller doesn't hide parts of the data views

Felix Paul Kühne 10 years ago
parent
commit
0707592a26
1 changed files with 11 additions and 0 deletions
  1. 11 0
      Sources/VLCPlaylistViewController.m

+ 11 - 0
Sources/VLCPlaylistViewController.m

@@ -150,6 +150,7 @@ static NSString *kDisplayedFirstSteps = @"Did we display the first steps tutoria
     }
 
     self.view = contentView;
+    [self displayMiniPlaybackViewIfNeeded];
 }
 
 #pragma mark -
@@ -445,9 +446,19 @@ static NSString *kDisplayedFirstSteps = @"Did we display the first steps tutoria
         _miniPlaybackView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleTopMargin;
         [_miniPlaybackView setupForWork];
         [self.view addSubview:_miniPlaybackView];
+        CGRect listViewRect = viewRect;
+        listViewRect.size.height = listViewRect.size.height - _miniPlaybackView.frame.size.height;
+        if (_usingTableViewToShowData)
+            _tableView.frame = listViewRect;
+        else
+            _collectionView.frame = listViewRect;
     } else {
         [_miniPlaybackView removeFromSuperview];
         _miniPlaybackView = nil;
+        if (_usingTableViewToShowData)
+            _tableView.frame = self.view.frame;
+        else
+            _collectionView.frame = self.view.frame;
     }
 }