MPMovieControlStyle = MPMovieControlStyleNone时如何触摸/单击MPMoviePlayerController视图 [英] How to get touch/click on a MPMoviePlayerController view when MPMovieControlStyle = MPMovieControlStyleNone

查看:223
本文介绍了MPMovieControlStyle = MPMovieControlStyleNone时如何触摸/单击MPMoviePlayerController视图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的一个应用程序中,我不想显示任何视频控制器。但我需要了解媒体播放器视图。我需要在电影播放器​​上做一些其他动作。我该如何实现呢。请帮助

In one of my application, I don't want to show any video controllers. But I need to get the touch on the media player view. I need to do some other action on touch on the movie player. How can I implement that. Please help

提前致谢。

推荐答案

您随时可以附上一个 UITapGestureRecognizer 到视图并处理水龙头。

You can always attach a UITapGestureRecognizer to the view and handle the taps.

UITapGestureRecognizer * tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(handleTap:)];
[moviePlayer.view addGestureRecognizer:tap];
[tap release];

并处理中的点击handleTap:

- (void)handleTap:(UITapGestureRecognizer *)gesture {
    // Do some other action as intended.
}

当然这仅适用于 iOS 3.2 以及之后。

Of course this works only on iOS 3.2 and later.

这篇关于MPMovieControlStyle = MPMovieControlStyleNone时如何触摸/单击MPMoviePlayerController视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆