MPMediaPickerController is very slow on iPad ios7

I am trying to display MPMediaPickerController in popover on iOS7 + and it is very slow. It takes about 4 seconds from the first NSLog to the second NSLog. I tried to keep the collector, but it doesn't matter. Any ideas would be greatly appreciated.

- (void) showMediaPickerControllerWithArrowDirection:(UIPopoverArrowDirection)arrow_direction
{
    MPMediaPickerController *self.picker = [[MPMediaPickerController alloc] initWithMediaTypes: MPMediaTypeAnyAudio];

    self.picker.modalPresentationStyle = UIModalPresentationPopover;
    self.picker.delegate = self;
    self.picker.allowsPickingMultipleItems = YES;

    UIPopoverPresentationController *popPresenter = self.picker.popoverPresentationController;
    popPresenter.sourceView = self.view;
    popPresenter.sourceRect = self.view.bounds;
    popPresenter.permittedArrowDirections = arrow_direction;

    NSLog(@"____________________________  about to launch picker ");

    [self.viewController presentViewController:self.picker animated:YES completion:^{
        NSLog(@"____________________________  picker launched ");
    }];
}

      

+3


source to share





All Articles