如何在iPhone中打开所有照片视图而不是相册视图?

时间:2016-01-13 05:17:52

标签: objective-c iphone uiimagepickercontroller

我正在开发一款iPhone应用程序。我从我的应用程序语法打开画廊,它的工作正常,但目前专辑正在显示,但我希望显示所有图像(不是所有专辑)。那么有人可以帮我实现这个目标吗?或者是否有可能?

我的代码是:

UIAlertAction *Gallery = [UIAlertAction actionWithTitle:@"Add Existing Photo" 
                                                  style:UIAlertActionStyleDefault 
                                                handler:^(UIAlertAction * action) 
{
    [alertcontroller dismissViewControllerAnimated:YES completion:nil];

    // 
    self.multipleImagePicker = [[RPMultipleImagePickerViewController alloc] init];

    self.multipleImagePicker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;

    // UIImagePickerController initialization

    self.picker.mediaTypes = [NSArray arrayWithObject:(NSString *)kUTTypeImage];

    // Photo Library
    self.picker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;

    [self presentViewController:self.picker animated:YES completion:nil];

}];

1 个答案:

答案 0 :(得分:1)

您需要将HTTP更改为sourceType

请浏览苹果文件。 UIImagePickerController