I am developing a music player application. I have picked music files from the ipod library, and is playing them. I'm using AVAudioPlayer for this. What i need now is to show the duration of the song on the top of the view. I got the duration as
NSTimeInterval *duration = [musicplayer duration];
But i dont know how to use it to display on the view, on uilabel or uitextfield. Or even using any other value.
Pls help..
Best Answer
Assuming label is your UILabel, try this:
Or, if you want it in minute:seconds
String formatting is your friend here.