Adjust view size of MPMediaPickerController?

In my application, I do not use the top bar, which displays Wi-Fi / Date / Time, because it is a game. However, I need my user to be able to select his music, so I use MPMediaPickerController. The problem is that when I present my controller, the controller ends up with a panel with 10 pixels (aprox) at the top of the screen, exactly where the Wi-Fi / Date / Time panel should be present.

Is there a way to make my MPMediaPickerController bigger? or be presented on top of 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 collector is still presented and leaves a place at the top of the screen, can someone help me?

Btw, this is how it looks:

alt text http://img195.imageshack.us/img195/1986/img0001yb.png

, , , , , ?

+3
3

. , , , , , Apple , - .

, , , , :

[[UIApplication sharedApplication] setStatusBarHidden:NO animated:YES];

( , , - ?)

+3
[[picker view] setBounds:CGRectMake(0, 0, 320, 480)];
0

May be,?

picker.wantsFullScreenLayout = YES;
picker.view.clipsToBounds = NO;
-1
source

Source: https://habr.com/ru/post/1716113/


All Articles