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?
views:
162answers:
1
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
2010-02-17 02:30:22
Thanks! This worked great!
Flafla2
2010-02-17 04:08:11