Assume iOS 3.2 or later. What is the proper sequence of command to play a move with the controls initially hidden. When the movie is playing, the user has the option to tag
player.moviePlayer.controlStyle = MPMovieControlStyleNone;
Is the newest way to do it. :)
Use a callback instead of a timer :
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(hidecontrol)
name:MPMoviePlayerLoadStateDidChangeNotification
object:playerView.moviePlayer];
With call back function :
- (void) hidecontrol {
[[NSNotificationCenter defaultCenter] removeObserver:self name:MPMoviePlayerNowPlayingMovieDidChangeNotification object:playerView.moviePlayer];
[playerView.moviePlayer setControlStyle:MPMovieControlStyleFullscreen];
}
[Update] As proposed by @ReinYem, a much better solution is to rely on a MPMoviePlayerLoadStateDidChangeNotification instead of a timer.
Actually, the following solution should not be considered anymore:
Set controlStyle property to MPMovieControlStyleNone initially, and then set it to MPMovieControlStyleFullscreen one second later using a [performSelector:withObject:afterDelay:1].
It works well, controls do not appear until user taps on video.