【问题标题】:How to open all Photo View instead of Album View in iPhone?如何在 iPhone 中打开所有照片视图而不是相册视图?
【发布时间】:2016-01-13 05:17:51
【问题描述】:

我正在开发一个 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];

}];

【问题讨论】:

    标签: objective-c iphone uiimagepickercontroller


    【解决方案1】:

    您需要将sourceType 更改为UIImagePickerControllerSourceTypePhotoLibrary

    请浏览苹果文档。 UIImagePickerController

    【讨论】:

    • 你好,kannan 比你快得多。我正在按照你的指南更改我的代码,一旦我完成了请回复我,非常感谢。
    • 请查看我的代码,我已经将源类型指定为UIImagePickerControllerSourceTypePhotoLibrary,但是它打开了相册视图,请帮忙。
    • 你好,你能帮我解决同样的视频问题吗?
    猜你喜欢
    • 2015-07-27
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多