views:

32

answers:

1

The app basically takes a picture, saves the image to a file and stores the file location in coredata. From here I either choose to save/submit this image or discard it. If the file is saved I want to leave it alone, if it's submitted I want to take the response and name the image that file, and if it's discarded I don't want it.

Ideally I want to just rename it after the response, but is this built in or will I have to do a few other steps?

Also, I've considered just submitting the raw data as well and renaming it after the reply but not sure if that would play well since I am submitting a dictionary.

+1  A: 

Renaming a file is counterintuitive.

You use -[NSFileManger moveItemAtPath:toPath:error:] or -[NSFileManger moveItemAtURL:toURL:error:] and supply a path with a different file name (last path component.) The file manager "moves" the file to the new path name thus renaming the file.

TechZen