ALAssetsLibrary を使用してアプリの写真を管理している場合、写真は常に保存された写真の下に表示されます。Apple Docsによると、ALAssetsLibraryの目的は
You use it to retrieve the list of all asset groups and to save images and videos into the Saved Photos album.
アプリ内で画像にアクセスするだけでよい場合は、読み取り、書き込み、およびそれらの表示を自分で処理できます。これにより、カメラの役割や保存された写真に表示されなくなります。
//WRITING TO APP DIRECTORY
NSString *directory = [NSHomeDirectory() stringByAppendingPathComponent:@"Photos/"];
if (![[NSFileManager defaultManager] fileExistsAtPath:directory]){
NSError* error;
[[NSFileManager defaultManager] createDirectoryAtPath:directory withIntermediateDirectories:YES attributes:nil error:&error];
}
NSData *imgData = UIImagePNGRepresentation(imageToCrop.image);
NSString *imgName = @"example.png";
NSString *pngPath = [NSHomeDirectory() stringByAppendingPathComponent:imgName];
[imgData writeToFile:pngPath atomically:YES];
//READING FROM APP DIRECTORY
NSArray *directoryContent = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:[NSHomeDirectory() stringByAppendingPathComponent:@"/Photos/"] error:NULL];
for (int i = 0; i < (int)[directoryContent count]; i++)
{
NSURL *url = [NSURL URLWithString:[NSHomeDirectory() stringByAppendingPathComponent:[NSString stringWithFormat:@"/Documents/Photos/%@",[directoryContent objectAtIndex:i]]]];
UIImage *image = [UIImage imageWithContentsOfFile:[url absoluteString]];
//ADD IMAGE TO TABLE VIEW OR HANDLE HOW YOU WOULD LIKE
}