audioPlayerDidFinishPlaying not being called during scrolling UITableView

Posted by Rob on Stack Overflow See other posts from Stack Overflow or by Rob
Published on 2010-06-13T20:21:33Z Indexed on 2010/06/13 20:22 UTC
Read the original article Hit count: 538

One of my views is a UITableView which acts as the delegate for an AVAudioPlayer and this table essentially plays sounds when you select a certain row with options to repeat the sound after its finished playing.

However, I noticed that if I select a cell with repeat ON for a certain sound and then scroll through the UITableView to select a different sound, it will not call audioPlayerDidFinishPlaying (and therefore not repeat) until after scrolling has stopped. As soon as I stop scrolling, it repeats just fine. Or if I don't scroll at all, it repeats just fine.

What could be happening during scrolling that the UITableView is no longer acting as the delegate and calling audioPlayerDidFinishPlaying? Any thoughts?

© Stack Overflow or respective owner

Related posts about iphone

Related posts about cocoa-touch