如何在iPhone上加载用户相册中的图像? [英] How can I load images from a user's photo album on the iPhone?

查看:139
本文介绍了如何在iPhone上加载用户相册中的图像?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想从用户的相册中随机加载图片,但我不想访问图像选择器(即我希望图像是随机背景图像)。有谁知道这是否可能?

I'd like to randomly load images from the user's photo album, but I'd prefer not to have to access an image picker (i.e. I'd like to have the images be random background images). Does anyone know if this is possible?

(我找不到任何参考文献:UIImageWriteToSavedPhotosAlbum)

(I couldn't find any references other than: UIImageWriteToSavedPhotosAlbum )

编辑:我正在尝试在iPhone应用程序中执行此操作。我没有使用我创建的已保存图像 - 我想加载已存储在相册中的任何照片。

I'm trying to do this within an iPhone app. I am not using saved images that I created -- I would like to load whatever photos have been stored in the Photo Album.

例如,如果我正在记忆中风格游戏,我可能希望卡片面孔随机选择相册中的图像。我怎么可能这样做?

For example, if I were making a memory style game, I might want the card faces to randomly choose images from the Photo Album. How might I go about that?

编辑2:我能找到的所有东西都是这样的:
http://trailsinthesand.com/picking-images-with-the-iphone-sdk-uiimagepickercontroller/

Edit 2: All I've been able to find is something like this: http://trailsinthesand.com/picking-images-with-the-iphone-sdk-uiimagepickercontroller/

我不想使用UIImagePickerController,因为我不想让用户做出决定。我希望能够访问图像文件夹,并能够加载它们,但我不确定这是Apple给我们访问的内容......

I'd prefer not to use the UIImagePickerController, because I didn't want to have the user have to make a decision. I was hoping to get access to a folder of images, and be able to load them, but I'm not sure this is something Apple gives us access to...

推荐答案

因此,基本上看起来在Apple批准的iPhone应用程序中无法做到这一点。

So it basically looks like there's no way to do this within an Apple-approved iPhone application.

你可以使用UIImagePickerController,然后在其中隐藏子视图,但是你的应用程序不太可能被Apple批准。

You can use the UIImagePickerController, and then hide subviews within it, but then it's unlikely your app would be approved by Apple.

所以,看起来我们会有等到可以添加这样的功能......

So, looks like we'll have to wait until functionality like this can be added...

这篇关于如何在iPhone上加载用户相册中的图像?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆