MPMediaPickerControllerベースのアプリケーションを実装しています。その中で、音楽アプリケーションを開こうとすると、[音楽]タブを表示する代わりに、[プレイリスト]タブに移動する必要があります。このために、選択したインデックスプロパティを使用して作成しました。しかし、それでも機能しません。
以下は私のコードです:
MPMediaPickerController *picker =
[[MPMediaPickerController alloc] initWithMediaTypes: MPMediaTypeMusic];
picker.delegate = self;
picker.allowsPickingMultipleItems = YES;
picker.prompt = NSLocalizedString (@"Select any song from the list", @"Prompt to user to choose some songs to play");
// The media item picker uses the default UI style, so it needs a default-style
// status bar to match it visually
[[UIApplication sharedApplication] setStatusBarStyle: UIStatusBarStyleDefault animated: YES];
picker.tabBarController.selectedIndex=1;
[picker.tabBarController.selectedViewController viewDidAppear:YES];
[self presentModalViewController: picker animated: YES];
[picker release];