2

Basically I have a three view stack. In the last view I got a MPMediaPickerController that lets the user pick a song from his/her library. The song is to be played later from the first view. How can I tell the player (in the first view) what should be played?

One possibility would be to send a notification and include the MPMediaItemCollection as the object maybe?

Is this a/the correct way or do you have other smarter suggestions?

sebrock
  • 1,214
  • 2
  • 15
  • 32

2 Answers2

1

I ended up using NSNotification and attaching the MediaItemCollection as userInfo.

sebrock
  • 1,214
  • 2
  • 15
  • 32
0

Use the MPMediaPickerController delegate:

in your third view controller set the MPMediaPickerController delegate to be your first view. Implement the delegate callback functions in your first view controller.

ugiflezet
  • 451
  • 9
  • 17