本文介绍了如何使UI Image Picker Controller在iPhone中读取自定义源类型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我必须在iPhone中创建照片库应用程序。它的功能应与iPhone附带的Photos应用程序相同。但它应该显示我用应用程序打包的图像。

I have to create a photo gallery app in iPhone. It should function same as the Photos app which is shipped with iPhone. But it should show the images which I package with the app.

UIImagePickerController只读取以下源类型。
UIImagePickerControllerSourceTypePhotoLibrary,
UIImagePickerControllerSourceTypeCamera,
UIImagePickerControllerSourceTypeSavedPhotosAlbum

UIImagePickerController reads only the following source types. UIImagePickerControllerSourceTypePhotoLibrary, UIImagePickerControllerSourceTypeCamera, UIImagePickerControllerSourceTypeSavedPhotosAlbum

我正在考虑将图像包添加到Xcode中的资源组并使UIImagePickerController成为阅读它们并显示。

I was thinking of adding the images bundle to the resources group in Xcode and make UIImagePickerController to read them and display.

查看类引用我发现UIImagePickerController仅从上面提到的资源中读取。这意味着它只能从相机胶卷或保存的照片库中选择图像,或者允许用户拍摄照片并使用它。

Looking at the class references I found UIImagePickerController reads only from the resources mentioned above. Which means it can only pick the images from camera roll OR saved photo gallery OR allow user to take a pic and use it.

是否有人知道如何从中读取UIImagePickerController自定义来源类型或图像?

Does anybody know how to make UIImagePickerController read from custom source type or images?

如何在iPhone中创建照片库应用: - )

How to create a photo gallery app in iPhone :-)

谢谢,
AJ

Thanks,AJ

推荐答案

我不知道相信有可能让UIImagePicker从您自己的来源中挑选图像。你必须自己编写选择器(除了性能之外,看起来并不难......只是UIScrollView中的几个UIImageViews)。

I don't believe it is possible to make the UIImagePicker pick images from your own source. You will have to write the picker yourself (which, performance aside, doesn't seem to hard... Just a couple of UIImageViews in a UIScrollView).

这篇关于如何使UI Image Picker Controller在iPhone中读取自定义源类型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

11-03 13:05