Fast Rewind & Fast Forward in AVAudioPlayer
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.
- Unsupported compiler 'GCC 4.2' selected for architecture 'armv7'
- iOS App with Static Lib crashes ONLY on launch of Archive Build loaded Ad Hoc. Can't reproduce in Debugger
- IOS, UIView, Detect Hidden State Change in Subview
- FBSOpenApplicationErrorDomain code =4 error
- Custom MKOverlayRenderer drawMapRect function not drawing polygons
- How to generate CGPoint-Array out of UIBezierPath (to touch-slide object along given path)
2 Solutions Collect From Internet About “Fast Rewind & Fast Forward in AVAudioPlayer”
One possible solution is to implement the repeating action by an
NSTimer. Have a look at UIButton Touch and Hold.
You can use an
AVPlayer instead and change the rate property on touch down.
Change it to -2 for rewind and 2 for fast-forward.
And remember to change the rate back to 1 on touch up inside/outside.
rate property supports values outside the
1.0 range IF
the associated player item returns YES for the AVPlayerItem properties canPlaySlowForward or canPlayFastForward
- UITextField not getting keyboard input
- Change UITabBar height
- How do I declare a class level function in Swift?
- Is there a way to get the socket reference by using CFStreamCreatePairWithSocketToHost()?
- How to sort an Array of Tuples?
- A dynamic method name (Objective-C)
- How to draw a custom UIView that is just a circle – iPhone app
- Display UIView with a UILabel text mask
- Does NSStringFromClass() generate a safe Core Data Entity name?
- Does App Store reject submission if NSAllowsArbitraryLoads set to YES?
- Scaning static UIImage using ios ZBar SDK
- KeyBoard is not appear while entering text into TextField
- How to get the time in am/pm format iphone NSDateFormatter?
- UISplitViewController rotation iOS8 not working as expected
- iOS Swift: Sound not playing