O'Reilly logo

iOS Components and Frameworks: Understanding the Advanced Features of the iOS SDK by Joe Keeley, Kyle Richter

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Media Picker

The simplest way to allow a user to specify which song he wants to hear is to provide him access to an MPMediaPickerController, as shown in Figure 6.2. The MPMediaPickerController allows the user to browse his artists, songs, playlists, and albums to specify one or more songs that should be considered for playback. To use an MPMediaPickerController, the class first needs to specify that it handles the delegate MPMediaPickerControllerDelegate, which has two required methods. The first mediaPicker:didPickMediaItems: is called when the user has completed selecting the songs she would like to hear. Those songs are returned as an MPMediaItemCollection object, and the MPMusicPlayerController can directly take this object as a parameter ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required