In principle, you can’t. But in practice, there is a way… Read on to find out.
iOS names the image IMG_<num> to avoid file name clashes. There is no way to change that from your app.
However, if the user later imports an image to iPhoto, then the metadata of the image will determine its title, description, and keywords.
If the user then exports the image to file, iPhoto can use the title for the name of the exported file. (Instructions for doing that are down below, after the code.)
Here is the code to set the metadata and save the image to the camera roll. The code below gets the image from the camera, but this isn’t necessary – the image can come from anywhere.
#import#import - (void) imagePickerController: (UIImagePickerController *)picker didFinishPickingMediaWithInfo: (NSDictionary *)info { [self dismissViewControllerAnimated:YES completion:nil]; UIImage *image = info[UIImagePickerControllerOriginalImage]; NSMutableDictionary *metadata = info[UIImagePickerControllerMediaMetadata]; // set image name and keywords in IPTC metadata NSString *iptcKey = (NSString *)kCGImagePropertyIPTCDictionary; NSMutableDictionary *iptcMetadata = metadata[iptcKey]; iptcMetadata[(NSString *)kCGImagePropertyIPTCObjectName] = @"Image Title"; iptcMetadata[(NSString *)kCGImagePropertyIPTCKeywords] = @"some keywords"; metadata[iptcKey] = iptcMetadata; // set image description in TIFF metadata NSString *tiffKey = (NSString *)kCGImagePropertyTIFFDictionary; NSMutableDictionary *tiffMetadata = metadata[tiffKey]; tiffMetadata[(NSString *)kCGImagePropertyTIFFImageDescription] = @"Description for image"; // only visible in iPhoto when IPTCObjectName is set metadata[tiffKey] = tiffMetadata; // save image to camera roll ALAssetsLibrary library = [[ALAssetsLibrary alloc] init]; [library writeImageToSavedPhotosAlbum:image.CGImage metadata:metadata completionBlock:nil]; }
Now the user can import the images to iPhoto and get your programmed title, description, and keywords.
To export the images to files that have the same name as the image title, the user should choose File > Export and then change the File Name field to Use title.


The private API
Some actions may sometimes have more than one possible target, and other times only one.
Or picking an image. If you’re running on a camera-less iPod, you just show a UIImagePickerController to pick from the photo library. But with a camera, and maybe an existing image to delete, you’ll want to show an action sheet to choose the actual action that your “Photo” button performs.
I like the simple and straightforward interface of the Reminders.app: edit reminders inline, and add a reminder by tapping and typing in the next empty line. So I wrote a UITableViewController subclass that does just that, but adds Edit mode with reordering.
I know, I know – not another badge class! But the thing is, the other badges laying around the net all seem overly complicated and too inflexible. So yes, I wrote another badge class. Luckily, it was really easy because I used the built-in capabilities of iOS, and it turned out very flexible and powerful, because, well, I used the built-in capabilities of iOS. No manual CoreGraphics drawing code, just automatic CALayer-s magic.
There is an easy but little known way to store many kinds of UIKit objects in CoreData without writing any code. It works for UIImage, UIColor, UIBezierPath, MKPlaceMark, NSDate, and any other class that conforms to the NSCoding protocol.