Note that there are some explanatory texts on larger screens.

plurals
  1. POUIImagePickerController lets me take photos and videos but will not let me save them or "use" them
    text
    copied!<p>I'm working on a simple photo and video capture app right now. The app successfully allows the user to take a photo or video on a button press. However, as soon as you finish taking your photo or video, it gives 2 options: "Retake" and "Use Photo" or "Use Video", depending on which one you're using.</p> <p>If the user taps "Retake" then it just let's them retake a new photo or video, but when the user taps "Use photo" or "Use video" it doesn't do anything. The app just takes them back to the main app screen.</p> <p>I am confused on how to access the "Use photo" / "Use Video" button so that I can edit it's code and have it save images and video to camera roll.</p> <p>Here is the code that I have so far:</p> <p><strong>ViewController.h:</strong></p> <pre><code>#import &lt;UIKit/UIKit.h&gt; @interface ViewController : UIViewController &lt;UINavigationControllerDelegate, UIImagePickerControllerDelegate&gt; @property UIImagePickerController * pickerController; -(IBAction)showCameraUI; @end </code></pre> <p><strong>ViewController.m:</strong></p> <pre><code>#import "ViewController.h" @interface ViewController () &lt;UINavigationControllerDelegate, UIImagePickerControllerDelegate&gt; @end @implementation ViewController - (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view, typically from a nib. [UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera]; [UIImagePickerController availableMediaTypesForSourceType:UIImagePickerControllerSourceTypeCamera]; NSLog(@"%ld", (long)UIImagePickerControllerSourceTypeCamera); } - (void)didReceiveMemoryWarning { [super didReceiveMemoryWarning]; // Dispose of any resources that can be recreated. } -(IBAction)showCameraUI{ UIImagePickerController * pickerController = [[UIImagePickerController alloc]init]; pickerController.mediaTypes = [UIImagePickerController availableMediaTypesForSourceType:UIImagePickerControllerSourceTypeCamera]; pickerController.sourceType = UIImagePickerControllerSourceTypeCamera; [self presentViewController:pickerController animated:YES completion:NULL]; } @end </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload