Commit 2b77bc5b2bc6c2d52ff3464dc3c92d4e2fe2039b
1 parent
6ed5d517
修改点播播放滑动退出问题
Showing
1 changed file
with
9 additions
and
8 deletions
LiveVideoCloud/Classes/Sections/homeSections/Controller/LVCVodPlayerController.m
| ... | ... | @@ -61,6 +61,14 @@ typedef enum { |
| 61 | 61 | - (void)viewWillDisappear:(BOOL)animated |
| 62 | 62 | { |
| 63 | 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 | 72 | [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleDefault]; |
| 65 | 73 | [[UIApplication sharedApplication] setStatusBarHidden: NO withAnimation:UIStatusBarAnimationNone]; |
| 66 | 74 | self.navigationController.navigationBar.hidden = NO; |
| ... | ... | @@ -391,13 +399,6 @@ typedef enum { |
| 391 | 399 | }]; |
| 392 | 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 | 402 | [self.navigationController popViewControllerAnimated:YES]; |
| 402 | 403 | } |
| 403 | 404 | } |
| ... | ... | @@ -636,7 +637,7 @@ typedef enum { |
| 636 | 637 | } |
| 637 | 638 | |
| 638 | 639 | - (void)dealloc { |
| 639 | - NSLog(@"dealloc"); | |
| 640 | + | |
| 640 | 641 | } |
| 641 | 642 | |
| 642 | 643 | - (void)didReceiveMemoryWarning { | ... | ... |