Probably a simple question for iOS5
They have changed the seekToTime method of AVFoundation to look like this:
[avPlayer seekToTime:startTime toleranceBefore:kCMTimeZero toleranceAfter:kCMTimeZero completionHandler:^(BOOL finished)completionHandler];
The constants kCMTimeZero and startTime are our own variables of type CMTime. Fine.
But I have NEVER seen the ^(BOOL finished) before, and don’t really know what to give it. There are no examples that I can see online (or in the apple doc).
I’m assuming that I need to give it a selector that will be called when the seekToTime is complete, but can’t figure out the right syntax. Can anybody give me the correct useage of this method?
Thanks.
It expects a regular objective-c block that accepts a
BOOLparameter that indicates “whether the seek operation completed” (quoted from documentation).