S.P*_*.P. 0 iphone file objective-c three20
我使用以下代码保存UIImage此图像保存在我的应用程序的Documents文件夹中.
NSString *pngPath = [NSHomeDirectory() stringByAppendingPathComponent:@"Documents/Test.png"];
[UIImagePNGRepresentation(currentImage) writeToFile:pngPath atomically:YES];
Run Code Online (Sandbox Code Playgroud)
如何在Three20 TTThumbsViewController中取回此图像?有人请帮帮我.我对这个UIImage的路径很困惑.
我试过file:///Users/sijo/Library/Application%20Support/iPhone%20Simulator/4.0.1/Applications/869B4AE9-A3DD-4F42-868E-E8863B15FAC3/Documents/Test.png
但是这张图片正在进入safari浏览器.但在我的iPhone应用程序中,它显示以下错误
[NSURLResponse allHeaderFields]:无法识别的选择器发送到实例0x7062d30 2010-08-27 20:29:04.304潮汐和天气[56179:207]***由于未捕获的异常'NSInvalidArgumentException'终止应用程序,原因:' - [NSURLResponse allHeaderFields] :无法识别的选择器发送到实例0x7062d30'
回答我自己的问题.
http://scope.three20.info/where-does-documents-correspond-to-in-my-project-t34.html
@ "文件://Test.png"
做了诀窍..