Question

i want put a movie at my application starting but i want hide the movie controls like (stop , play , next and ... ) here is my code :

#import <MediaPlayer/MediaPlayer.h>



-(void)viewDidLoad
{
     NSBundle *bundle = [NSBundle mainBundle];
     NSString *moviePath = [bundle pathForResource:@"myvideo" ofType:@"mp4"];
     NSURL *movieURL = [[NSURL fileURLWithPath:moviePath] retain];
     MPMoviePlayerController *IntroMovie = [[MPMoviePlayerController alloc] initWithContentURL:movieURL];
     [IntroMovie play];
}
Was it helpful?

Solution 2

Ok, i figured it out.

Code:

IntroMovie.movieControlMode = MPMovieControlModeHidden;

OTHER TIPS

You could do IntroMovie.controlStyle = MPMovieControlStyleNone;

Since .movieControlMode was deprecated.

In Objective-C

moviePlayer.controlStyle = MPMovieControlStyleNone;

In Swift

 moviePlayer.controlStyle = MPMovieControlStyle.None
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top