如何在iPhone应用程序中上传图像 [英] How to upload an image in iPhone application

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

问题描述

我想创建一个应用程序,要在其中从iPhone上载图像到我的应用程序.

I want to create an application where I want to upload image from the iPhone in my application.

例如,在通讯录目录应用程序中,您为每个用户都有一个图像图标,当您单击该图标时,它将带您到图片库以为该人上传照片.

For example, in the contacts directory application, You have an image icon for each of the user and when you click on the icon, it takes you to the picture gallery to upload the photo for that person.

我想实现同样的事情.怎么做.

I want to implement the same thing. How to do that.

谢谢

推荐答案

要保存图像,您将需要使用uiimagepicoercontroller类从相机拍摄图片或从phto相册获取图片,然后您将需要使用方法UIImageJpEgRepresentation(image,int)获取图像数据,然后您可以通过使用核心数据或将其写入文件来持久保存图像数据

Well to save the image you will need to use he uiimagepicoercontroller class to take a picture from camera or get it from phto album, then u will need to use the mehod UIImageJpEgRepresentation(image,int) to get the images data, then u can persist the image data by using core data or writting it to a file

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

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