Adjust size of MPMediaPickerController's view ?
Posted
by Mr.Gando
on Stack Overflow
See other posts from Stack Overflow
or by Mr.Gando
Published on 2009-08-26T13:53:50Z
Indexed on
2010/05/19
5:20 UTC
Read the original article
Hit count: 338
In my application I don't use the upper bar that displays Wi-Fi/Date/Time because it's a game. However I need to be able to let my user to pick his music, so I'm using a MPMediaPickerController. The problem is, that when I present my controller, the controller ends up leaving a 10 pixels ( aprox ) bar at the top of the screen, just in the place the Wi-Fi/Date/Time bar, should be present.
Is there a way I could make my MPMediaPickerController bigger ? or to be presented upper in the screen ?
// Configures and displays the media item picker.
- (void) showMediaPicker: (id) sender
{
MPMediaPickerController *picker =
[[MPMediaPickerController alloc] initWithMediaTypes: MPMediaTypeAnyAudio];
[[picker view] setFrame:CGRectMake(0, 0, 320, 480)];
picker.delegate = self;
picker.allowsPickingMultipleItems = YES;
picker.prompt = NSLocalizedString (@"AddSongsPrompt", @"Prompt to user to choose some songs to play");
[self presentModalViewController:picker animated: YES];
[picker release];
}
There I tried to set the size to 320x480 but no luck, the picker is still presented and leaves a space in the upper part of the screen, could anyone help me ?
Btw, here's how it looks:
I have asked a bit, and people told me this could indeed be a bug, what do you guys think ?
© Stack Overflow or respective owner