首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 移动开发 > Iphone >

How can I get a writable path on the iPhone

2012-07-01 
How can I get a writable path on the iPhone?原文链接:http://stackoverflow.com/questions/1567134/how

How can I get a writable path on the iPhone?

原文链接:http://stackoverflow.com/questions/1567134/how-can-i-get-a-writable-path-on-the-iphone

?

NSString *filePath = [cachePath stringByAppendingPathComponent:@"SomeTmpFile.png"];?

Use that path for reading or writing.

Note that you can make subdirectories in either of those writable paths, which one of the example string above is using (assuming one has been created).

If you are trying to write an image into the photo library, you cannot use file system calls to do this - instead, you have to have a UIImage in memory, and use the?UIImageWriteToSavedPhotosAlbum()function call defined by UIKit. You have no control over the destination format or compression levels, and cannot attach any EXIF in this way.

热点排行