كيف يمكنني إخفاء الضوابط MPMoviePlayer؟
-
11-09-2019 - |
سؤال
أريد وضع فيلم في طلبي بدءا ولكن أريد إخفاء عناصر تحكم الفيلم مثل (إيقاف، تشغيل، التالي و ... هنا هو رمزي:
#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];
}
المحلول 2
حسنا، أنا أحسب ذلك.
رمز:
IntroMovie.movieControlMode = MPMovieControlModeHidden;
نصائح أخرى
يمكنك القيام بذلك IntroMovie.controlStyle = MPMovieControlStyleNone;
منذ. تم إهمال moviecontrolmode.
في الهدف - ج
moviePlayer.controlStyle = MPMovieControlStyleNone;
في سويفت
moviePlayer.controlStyle = MPMovieControlStyle.None
لا تنتمي إلى StackOverflow