• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Managing image loading
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Managing image loading


  • Subject: Re: Managing image loading
  • From: Jens Alfke <email@hidden>
  • Date: Tue, 04 Feb 2014 11:47:35 -0800

On Feb 4, 2014, at 9:03 AM, Leonardo <email@hidden> wrote:

> - When the user imports a new image, I add its NSData to the NSFileWrapper
>    [docFileWrapper addRegularFileWithContents:imgData
>        preferredFilename:@"image.png"];
> and retain the NSImage. So I can draw the NSImage at any time.

You don't need an NSFileWrapper for that. I would just use NSFileManager to copy the file, and NSData methods to read/write the file. I have no idea whether NSFileWrapper caches the file contents in memory or not.

—Jens
_______________________________________________

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


  • Follow-Ups:
    • Re: Managing image loading
      • From: Leonardo <email@hidden>
References: 
 >Re: Managing image loading (From: Leonardo <email@hidden>)

  • Prev by Date: Re: Managing image loading
  • Next by Date: __CF120290
  • Previous by thread: Re: Managing image loading
  • Next by thread: Re: Managing image loading
  • Index(es):
    • Date
    • Thread