快退& AVAudioPlayer中的快进 [英] Fast Rewind & Fast Forward in AVAudioPlayer

查看:227
本文介绍了快退& AVAudioPlayer中的快进的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在实现AVAudioPlayer和快退,快进功能。我用手势,图像和发光效果制作了两个按钮。目前,当我选择快进时,它最初将播放项目转发到10秒,然后以正常方式播放,即使我仍然按下按钮。我希望像在Iphone / Ipod标准应用程序中一样实现它。

I am implementing AVAudioPlayer and fast-rewind,fast-forward functionality. I have made two button with gesture, images and glow effects. Currently when I tab on fast-forward, it initially forward the playing item to 10 sec and then playing same way as in normal, even though I am still pressing the button. I want to implement it exactly same like in Iphone/Ipod standard app.

推荐答案

一种可能的解决方案是通过以下方式实现重复操作一个 的NSTimer 。请查看 UIButton触摸并按住

One possible solution is to implement the repeating action by an NSTimer. Have a look at UIButton Touch and Hold.

这篇关于快退& AVAudioPlayer中的快进的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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