Reputation: 1620
I have 100's of images that I need to format on a UIView. I need to be able to access screenshots of these images remotely so I figure the most convenient way is to prerender them as .png's and just upload them directly. They won't be unique for each user so no point having each user upload there own, that could get ugly quickly.
Can anybody tell me how I could go about doing this in a Mac or iOS application?
I'm currently using UIGraphicsGetImageFromCurrentImageContext to create a png in memory but I have no idea how to physically save it as a file that exists outside the application.
Upvotes: 0
Views: 119
Reputation: 119031
Use UIImagePNGRepresentation
to get the data from the UIImage
. Then use writeToFile:atomically:
to save the data to disk or NSURLConnection
to send the data to a web service.
Upvotes: 1