I'm new to ios, please help me out.
- (IBAction)btn_actionTakePicture:(UIButton *)sender {
UIImagePickerController *picker = [[UIImagePickerController alloc] init];
picker.delegate = self;
picker.allowsEditing = YES;
picker.sourceType = UIImagePickerControllerSourceTypeCamera;
[self presentViewController:picker animated:YES completion:NULL];
}
I press the take picture button, and this code runs, the camera comes up and i can take a photo.
- (NSArray *) listFiles {
NSURL *bundleRoot = [[NSBundle mainBundle] bundleURL];
NSFileManager *fm = [NSFileManager defaultManager];
NSArray * dirContents =
[fm contentsOfDirectoryAtURL:bundleRoot
includingPropertiesForKeys:@[]
options:NSDirectoryEnumerationSkipsHiddenFiles
error:nil];
return dirContents;
}
This is where I check file contents to see if the photo was taken and saved in the directory, I basically put the returned (NSArray *) in an NSLog to see the list of files and if there are photos there or not, I did not see any saved jpgs.
Where are the files being saved to, I also checked the photo roll, they aren't being saved there either.