iphone - UIImagePickerController 选取多个图像

标签 iphone ios uiimagepickercontroller

如何从 UIImagePickerController 中选取多个图像?

最佳答案

我认为您不能通过 API 直接执行此操作。但是您可以简单地保持选择器打开并在回调中构建图像列表:

- (void) imagePickerController: (UIImagePickerController*) picker
    didFinishPickingMediaWithInfo: (NSDictionary*) info
{
    [images addObject:[info objectForKey:UIImagePickerControllerOriginalImage]];
    // There has to be some exit condition,
    // otherwise the user would pick forever.
    if ([images count] == 3)
        [self dismissModalViewControllerAnimated:YES];
}

关于iphone - UIImagePickerController 选取多个图像,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1393755/

相关文章:

ios - Xcode/iOS - 尝试通过简单的打印来进行控制台调试,但无法正常工作。不知道如何找到问题

IOS/xcode/核心数据 : Implement calendar control using core data

ios - 调用 UIImagePickerController (SourceType Camera) 卸载标签栏 Controller 中的其他页面(其他标签)

ios - 模棱两可的 "use of unresolved identifier"错误?

ios - 如何向 UIImagePickerController 添加一些选项

ios - iOS7 中 NSFetchedResultsController 的问题?

iphone - 使用 loadNibNamed 加载 UITableViewCell 时保留计数

ios - 如何从 Xcode 8 中删除坏证书?

iOS 部分索引滚动到错误的位置

iphone - 在 xcode for iphone 中带有 LIKE 语句的 sqlite