Re: saving images
Re: saving images
- Subject: Re: saving images
- From: Conrad Shultz <email@hidden>
- Date: Sat, 21 Jul 2012 09:58:31 -0700
NSImage is for OS X. You need to use UIImage on iOS. One difference is that UIImage doesn't have an -initWithContentsOfURL: method.
Note that UIImage conforms to NSCoding, so once you've loaded a UIImage through whichever means you prefer (NSData, the URL loading system, etc.) you can archive the image to an NSData (and of course unarchive) in the usual manner.
(Sent from my iPhone.)
--
Conrad Shultz
On Jul 21, 2012, at 9:03, "H. Miersch" <email@hidden> wrote:
> hi.
>
> i just started a new ios project where i want to download images using NSimage's initwithcontentsofURL: method.
> now i also want to write those images to permanent storage, but how do i do that? as far as i can tell, NSImage has no method for writing images to disk. is there something i missed? should i download them into an NSData object and save that? but if i do that, will initwithcontentsoffile: read them properly? questions, questions, questions...
>
> any help will be appreciated. thanks.
> _______________________________________________
>
> Cocoa-dev mailing list (email@hidden)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden