On Youtube I find next video and I understand that I can save photo to document directory. It was next code in video
UIImage *image = [info objectForKey:UIImagePickerControllerOriginalImage];
NSData *data = UIImagePNGRepresentation (image);
NSString *myGrabbedImage = @"myGrabbedImage.png";
NSArray *path = NSSearchPathForDirectoriesInDomainns (NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentDirectory = [path objectAtIndex:0];
NSString *fullPathToFile = [documentDirectory stringByAppendingPathComponent:myGrabbedImage];
[data writeToFile:fullPathToFile atomically:YES];
So I understand that is simple to save photo from Photo Library to my array, and then open photos from array. And I will can than simply delete photos by remove them from my array. Ok, but now I have 2 questions:
- How I can distinguish photos that i will save in my array? If I will allocate same photo in Photo Library it will be save some times - it's not good.
- So it will be work only with PNG images?
PS Sorry, if this questions very newbiest, but my brain exploded after allday searching.