Commit 2b77bc5b2bc6c2d52ff3464dc3c92d4e2fe2039b

Authored by 王军波
1 parent 6ed5d517

修改点播播放滑动退出问题

LiveVideoCloud/Classes/Sections/homeSections/Controller/LVCVodPlayerController.m
@@ -61,6 +61,14 @@ typedef enum { @@ -61,6 +61,14 @@ typedef enum {
61 - (void)viewWillDisappear:(BOOL)animated 61 - (void)viewWillDisappear:(BOOL)animated
62 { 62 {
63 [super viewWillDisappear:animated]; 63 [super viewWillDisappear:animated];
  64 + [_player stop];
  65 + [_autoHideTimer invalidate];
  66 + _autoHideTimer = nil;
  67 + [_currentTimer invalidate];
  68 + _currentTimer = nil;
  69 + [[NSNotificationCenter defaultCenter]removeObserver:self name:MPMoviePlayerPlaybackStateDidChangeNotification object:nil];
  70 + [_playerSuperView removeFromSuperview];
  71 +
64 [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleDefault]; 72 [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleDefault];
65 [[UIApplication sharedApplication] setStatusBarHidden: NO withAnimation:UIStatusBarAnimationNone]; 73 [[UIApplication sharedApplication] setStatusBarHidden: NO withAnimation:UIStatusBarAnimationNone];
66 self.navigationController.navigationBar.hidden = NO; 74 self.navigationController.navigationBar.hidden = NO;
@@ -391,13 +399,6 @@ typedef enum { @@ -391,13 +399,6 @@ typedef enum {
391 }]; 399 }];
392 } else { 400 } else {
393 401
394 - [_player stop];  
395 - [_autoHideTimer invalidate];  
396 - _autoHideTimer = nil;  
397 - [_currentTimer invalidate];  
398 - _currentTimer = nil;  
399 - [[NSNotificationCenter defaultCenter]removeObserver:self name:MPMoviePlayerPlaybackStateDidChangeNotification object:nil];  
400 - [_playerSuperView removeFromSuperview];  
401 [self.navigationController popViewControllerAnimated:YES]; 402 [self.navigationController popViewControllerAnimated:YES];
402 } 403 }
403 } 404 }
@@ -636,7 +637,7 @@ typedef enum { @@ -636,7 +637,7 @@ typedef enum {
636 } 637 }
637 638
638 - (void)dealloc { 639 - (void)dealloc {
639 - NSLog(@"dealloc"); 640 +
640 } 641 }
641 642
642 - (void)didReceiveMemoryWarning { 643 - (void)didReceiveMemoryWarning {