Hope this works for you
//initialize image picker and add to popover controller
UIImagePickerController* imagePickerController= [[UIImagePickerController alloc] init];
imagePickerController.delegate=self;
imagePickerController.sourceType= UIImagePickerControllerSourceTypePhotoLibrary;
popoverController= [[UIPopoverController alloc] initWithContentViewController:imagePickerController];
[popoverController presentPopoverFromBarButtonItem:sender permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];