实现MPMoviePlayer超时的最佳方法 [英] Best way to implement MPMoviePlayer timeout
本文介绍了实现MPMoviePlayer超时的最佳方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有MPMoviePlayer从流加载电影。我用计时器在15秒内实现了超时。但是,是否有其他更好的方法可以在没有计时器的情况下实现超时?
I have MPMoviePlayer that load movie from stream. I implemented timeout on 15 seconds with timers. But is there maybe some other better way to implement timeout without timer?
推荐答案
我不确定,但我认为可以使用 performSelector
作为计时器?
I'm not sure but i think it's possible to use performSelector
as timer?
[self performSelector:@selector(checkTimeout:) withObject:theMovie afterDelay:15];
然后检查电影状态。
这篇关于实现MPMoviePlayer超时的最佳方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文