소스 검색

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 년 전
부모
커밋
7ec2c74657
2개의 변경된 파일16개의 추가작업 그리고 0개의 파일을 삭제
  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;