santa
santa

Reputation: 147

UIImagePicker Ipad IOS6

I want to upload image with both camera and gallery in IPAD. But in IOS 6, When I try to choose from gallery application is crashed. Here below is my code:

    picker.sourceType =
    UIImagePickerControllerSourceTypeSavedPhotosAlbum;
    picker.allowsEditing = NO;
    picker.wantsFullScreenLayout = NO;

    popoverController = [[UIPopoverController alloc]
                         initWithContentViewController:picker];
    [popoverController presentPopoverFromRect:CGRectMake(44, 6, 111, 111) inView:self.view.superview permittedArrowDirections:UIPopoverArrowDirectionUp animated:NO];  //When app enter this line , app starts to crash.

I have checked with self.view instead of self.view.superview too. I got the same error.Actually , app crashed in this line . I didnt see any specific error in debug console.

Thank you very much.

Upvotes: 0

Views: 31

Answers (1)

Retro
Retro

Reputation: 4005

i guess self.view.superview is wrong line, a popover should be part of self view, not its superview. Give any specific frame or any view element frame

Upvotes: 2

Related Questions