开发者

MPMediaPickerController on iPad - bottom of view not accepting touch events

I'm having some trouble with this Media picker on iPad... I can easily recreate the problem in a fresh View-based application.

1) Create new View-Based application for i开发者_StackOverflowPad in XCode

2) Open the source for the View Controller and add the following

- (void)viewDidAppear:(BOOL)animated
{
    [super viewDidAppear:animated];

    MPMediaPickerController *picker = [[MPMediaPickerController alloc] initWithMediaTypes: MPMediaTypeAnyAudio];
    picker.allowsPickingMultipleItems   = NO;
    picker.prompt = NSLocalizedString (@"Select a song to play", "Prompt in media item picker");
    [self presentModalViewController:picker animated:YES];
    [picker release];
}

That's it. When I run the resulting application, I find I am unable to activate anything on the bottom tab bar. Neither am I able to select any of the bottom 4 items in the table view.

Has anyone else encountered this problem and found a way around it?

===

Also, I tried presenting the picker using the UIModalPresentationStyleFormPage mode, but while that is functional, it ends up getting displayed oddly and won't be acceptable for my app. If anyone knows a way to properly center this thing in FormPage style, that would also solve the problem, at least for me.


I spent a couple days on this and I finally gave up and used

        picker.modalPresentationStyle = UIModalPresentationPageSheet;
    picker.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;

not as big but gets me over this problem. Hope this helps


The correct approach is probably to present the picker in a popover, which works fine. Though not documented, this is probably what you're expected to do; it is certainly the case with many other built-in picker view controllers.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜