gpt4 book ai didi

ios - 如何在没有控件的情况下启动 MoviePlayer?

转载 作者:行者123 更新时间:2023-11-28 22:19:37 25 4
gpt4 key购买 nike

我想在没有控件的情况下启动 MoviePlyer,但如果用户触摸屏幕,则会显示控件并允许用户进入全屏或 AirPlay。

self.player = [[MPMoviePlayerController alloc] initWithContentURL:url];
self.player.allowsAirPlay = YES;
self.player.view.frame = self.imageView.frame;
self.player.controlStyle = MPMovieControlStyleNone;

[self.view addSubview:self.player.view];
[self.player play];

self.player.controlStyle = MPMovieControlStyleDefault;

似乎最初删除控件的唯一方法是设置为 MPMovieControlStyleNone,但以后不会显示任何控件。如果我稍后设置为 MPMovieControlStyleDefault,控件将始终显示。

我该怎么办?是否有用于将控件设置为初始关闭的属性?

最佳答案

关于ios - 如何在没有控件的情况下启动 MoviePlayer?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20769278/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com