需要在一个窗口中将我的照片库中的所有照片显示为缩略图

发布于 2024-11-03 12:11:45 字数 137 浏览 7 评论 0原文

我需要在我的照片库中的一个窗口中将所有照片显示为缩略图?有没有工具可以显示所有照片?我该怎么做?我还需要从显示的窗口中选择照片并将所选项目与用户一起保存到 AppBundle给定的名称。可以告诉我正确的方法,如果可能的话,可以告诉我任何示例代码来开始我的工作。

i need to display all the photos as thumbnails in one window from my photolibrary?is there any tool to display all?How can i do it?also i need to select photos from the displayed window and save the selected item to AppBundle with the user given name.could tell me in the correct way to do it and if possible any sample code to get my started.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

我不吻晚风 2024-11-10 12:11:45

这是一个详细的问题,确实与您想要如何设计应用程序有更多关系,但是,我可以回答部分技术方面的问题。

要显示您的照片库,您可以使用 UIImagePickerController 类并显示它,方法如下:

if([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypePhotoLibrary])
    {
        UIImagePickerController *picker = [[UIImagePickerController alloc] init];
        picker.delegate = self;
        picker.navigationBar.barStyle = UIBarStyleDefault;
        picker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
        [self presentModalViewController:picker animated:YES];
        [picker release];
    }

然后您实现委托方法:

-(void) imagePickerController:(UIImagePickerController *)picker 
        didFinishPickingImage:(UIImage *)image 

当用户从显示的 UIImagePickerController 中选取图像完成时,将调用此方法。您可以在此处将图像保存到捆绑包中或显示一个新屏幕来命名它或执行任何您想要执行的操作。要将图像保存到捆绑包中,请查看:保存图像 。另外,有关 UIImagePickerController 的更多信息,请查看其 苹果参考

This is a detailed question, that really has a lot more to do with how you want to design your app, however, I can answer part of the technical aspect.

To show your photo library, you use the UIImagePickerController class, and display it, with something like:

if([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypePhotoLibrary])
    {
        UIImagePickerController *picker = [[UIImagePickerController alloc] init];
        picker.delegate = self;
        picker.navigationBar.barStyle = UIBarStyleDefault;
        picker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
        [self presentModalViewController:picker animated:YES];
        [picker release];
    }

Then you implement the delegate method:

-(void) imagePickerController:(UIImagePickerController *)picker 
        didFinishPickingImage:(UIImage *)image 

This method is called when the user finishes picking an image from the displayed UIImagePickerController. Here is where you can save the image to the bundle or present a new screen to name it or whatever you want to do. For saving an image to the bundle take a look at: save an image. Also for more info on UIImagePickerController, take a look at its Apple Reference

妖妓 2024-11-10 12:11:45

您可以使用 Three20 照片库查看器应用程序。

检查下面的链接以了解如何使用 Three20 照片查看器< /a>

查看博客教程以将所有照片显示为缩略图。

http://trailsinthesand.com/picking-images-with-the- iphone-sdk-uiimagepickercontroller/

you could the three20 photo library viewer application.

Check below link to know How to use the three20 photo viewer

Check the blog tutorial for displaying all the photos as thumbnails.

http://trailsinthesand.com/picking-images-with-the-iphone-sdk-uiimagepickercontroller/

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文