Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
sでNSCache満たされた a を永続的に保存する最も簡単な方法は何ですか? Core Data を探してNSImageいるわけではありません。これは、画像を含む辞書を格納するだけではやり過ぎのようです。
NSCache
NSImage
写真のセットしかない場合は、ユーザーからパスを取得し、NSImage を使用TIFFRepresentationして各写真の NSData のインスタンスを取得し、NSFileManager と NSFileHandle を使用してパスに書き込むことができます。
TIFFRepresentation
タグなど、画像に付随する情報がある場合は、画像のタイトルを識別するとともに、辞書の配列に入れます。次に、NSArray のwriteToFile:atomically:メソッドを使用して plist を書き出すことができます。
writeToFile:atomically: