Done button event MPMoviePlayerController

前端 未结 7 773
闹比i
闹比i 2020-12-06 09:20

On my iPhone i\'m playing video/audio files in fullscreen mode. When the video/audio file reached its end then the following method is triggered:

- (void) mo         


        
7条回答
  •  佛祖请我去吃肉
    2020-12-06 09:37

    @property (nonatomic, strong) MPMoviePlayerController *moviePlayer;
    
    [[NSNotificationCenter defaultCenter] addObserver:self 
                                             selector:@selector(doneButtonClick:) 
                                                 name:MPMoviePlayerDidExitFullscreenNotification 
                                               object:nil];
    
    - (void)doneButtonClick:(NSNotification*)aNotification
    {
        if (self.moviePlayer.playbackState == MPMoviePlaybackStatePaused)
        {
            NSLog(@"done button tapped");
        }
        else
        {
            NSLog(@"minimize tapped");
        }
    }
    

提交回复
热议问题