PDA

View Full Version : how to get the path and url of the temp image ?




xiaohuli170
Feb 12, 2009, 09:35 PM
I capture a image of webview that playing a flash. Because I want to show this image and use the IKSaveOptions to save the image .but I found the path of image is nil, Now I want to get the path of image , How to do ?
my code:
NSString *path = [[NSBundle mainBundle] pathForResource: ?? ofType:??];
NSURL *url = [NSURL fileURLWithPath: path];
then I use the url to show the image in the imageview,but Now I didn't get the path ,Thanks a lot!



kainjow
Feb 14, 2009, 01:36 AM
pathForResource:ofType: returns the path of an image in the Resources folder within your application's bundle. Is this where your image is stored? If it's where you want it to be stored, make sure it's listed under the target's Copy Bundle Resources group in Xcode.