tags:

views:

162

answers:

1

I am creating a music application, much like the standard music app. Now, I am befuddled on how they were able to read and change the elapsed time of a song using a UISlider. How is it possible to read and change the elapsed time of a song?

A: 

By calling beginGeneratingPlaybackNotifications on the MPMusicPlayerController and registering for MPMusicPlayerControllerPlaybackStateDidChangeNotification notifications, you will receive periodic updates when the playback state has changed. In the handler for that notification you can then get the currentPlaybackTime from the MPMusicPlayerController.

St3fan
Thanks! This worked great!
Flafla2