Browse Source

fix Missing volume overlay by correctly sending appearance transitions to control panel controller
and setting MPVolimeView hidden when control panel is not visible

closes #15963

Tobias Conradi 9 years ago
parent
commit
7ec2c74657
2 changed files with 16 additions and 0 deletions
  1. 12 0
      Sources/VLCMovieViewControlPanelViewController.m
  2. 4 0
      Sources/VLCMovieViewController.m

+ 12 - 0
Sources/VLCMovieViewControlPanelViewController.m

@@ -65,6 +65,18 @@ static const CGFloat maxCompactWidth = 420.0;
     _compactMode = YES;
     [self setupConstraints:YES];
 }
+- (void)viewWillAppear:(BOOL)animated
+{
+    [super viewWillAppear:animated];
+    self.volumeView.hidden = NO;
+}
+
+- (void)viewDidDisappear:(BOOL)animated
+{
+    [super viewDidDisappear:animated];
+    self.volumeView.hidden = YES;
+}
+
 
 - (void) viewWillLayoutSubviews {
     [super viewWillLayoutSubviews];

+ 4 - 0
Sources/VLCMovieViewController.m

@@ -546,6 +546,8 @@ typedef NS_ENUM(NSInteger, VLCPanType) {
     _controlsHidden = hidden;
     CGFloat alpha = _controlsHidden? 0.0f: 1.0f;
 
+    [self.controlPanelController beginAppearanceTransition:hidden animated:animated];
+
     if (!_controlsHidden) {
         _controllerPanel.alpha = 0.0f;
         _controllerPanel.hidden = !_videoFiltersHidden;
@@ -602,6 +604,8 @@ typedef NS_ENUM(NSInteger, VLCPanType) {
         _artistNameLabel.hidden = _audioOnly ? NO : _controlsHidden;
         _albumNameLabel.hidden =  _audioOnly ? NO : _controlsHidden;
         _trackNameLabel.hidden =  _audioOnly ? NO : _controlsHidden;
+
+        [self.controlPanelController endAppearanceTransition];
     };
 
     UIStatusBarAnimation animationType = animated? UIStatusBarAnimationFade: UIStatusBarAnimationNone;