title: How do I retrieve an image that I saved in a temporary location
body: <p>I have an iOS application where have a view controller where the user can access their camera or library to load up a picture. I am trying to create a temporary copy of this to load into another UIImageView within another view controller. I am able to save the file (at least it looks so in a NSLog, but I'm having trouble accessing it to populate the second viewcontroller. </p>
  
  <p>First view controller where the user loads an image:</p>
  
  <pre><code>-(void) imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info {
  image = [info objectForKey:UIImagePickerControllerOriginalImage];
  [userImageView setImage:image];
  [self dismissViewControllerAnimated:YES completion:NULL];
  
  //Save the temp file
  tmpDirURL = [NSURL fileURLWithPath:NSTemporaryDirectory() isDirectory:YES];
  fileURL = [[tmpDirURL URLByAppendingPathComponent:@"userPic"] URLByAppendingPathExtension:@"jpg"];
  NSLog(@"fileURL: %@", [fileURL path]);
  }
  </code></pre>
  
  <p>The question I have is, how can I call the saved file in the viewdidload of the second view controller?</p>
  
  <p>I was playing around with stuff like this, but I'm getting errors (I was just wishing!):</p>
  
  <pre><code>userImageView.image = _fileURL;
  </code></pre>
  
  <p><code>userImageView</code> is an outlet that I have set to my image view.</p>
  
  <p>declared in the .h file of the first controller</p>
  
  <pre><code>@property (nonatomic, strong) IBOutlet NSURL *fileURL;
  @property (nonatomic, strong) IBOutlet NSURL *tmpDirURL;
  </code></pre>