tags:

views:

22

answers:

2

Not sure what to call this, but I'd like to offer a way for users to pick and control their music from within my app. I've seen a few apps that offer an "iPod" button that appears to bring up the iPod app. Is this a built in control like the UIImagePickerController or have they simply duplicated all the functionality?

+1  A: 

Check out the MediaPlayer framework. In particular, you're talking about the MPMediaPickerController

Art Gillespie
A: 

What I'm doing in Couch to 5k is inserting a UIView with a toolbar, labels, and an image view. The toolbar has the standard buttons for controlling the iPod music player. Then I'm using MPMusicPlayerController to control the iPod music playback.

Here's some sample code to get the iPod music player and what's playing:

musicPlayer = [MPMusicPlayerController iPodMusicPlayer];
item = musicPlayer.nowPlayingItem;

And then I register for NSNotification using the code provided in Apple's documentation on MPMusicPlayerController.

lucius