Specify 'songs' tab for MPMediaPickerController

216 views Asked by At

Good day- I have some code that opens the MPMediaPickerController:

MPMediaPickerController *mediaPicker = [[MPMediaPickerController alloc] initWithMediaTypes:MPMediaTypeMusic];

mediaPicker.delegate = self;
mediaPicker.allowsPickingMultipleItems = NO;

// show media picker
[[[[UIApplication sharedApplication] keyWindow] rootViewController] presentViewController:mediaPicker animated:YES completion:NULL];

[mediaPicker release];

Since iOS7, the picker defaults to the 'playlists' tab. Is there a way to make it default to the 'songs' tab (or any other tab) ? Thanks.

1

There are 1 answers

0
Harsh On

You can not change the default tab of the MPMediaPickerController, as you have already mentioned prior to iOS 7 the defaults tab of the MPMediaPickerController was songs tab , but in ios 7 they have changed it to playlist tab!

For more info you can check the apple's documentation which doesn't mention anything like this.

Sorry, It's not a regular UITabBarController.