title: Passing Image of ImagePickerView in another View Controller
body: <p>Hello to everyone in my view controller I'm using imagePickerView</p>
  
  <p>When the user selects a photo from the library I would like the selected photo will be displayed in another view controller .</p>
  
  <p>I'm currently using the storyboard so I'm using this method:</p>
  
  <pre><code>- (void) imagePickerController : ( UIImagePickerController *) picker didFinishPickingMediaWithInfo : ( NSDictionary *) info {
          
      UIImage * PhotoForEdit = self.FF_image ;
      PhotoForEdit = [info objectForKey : UIImagePickerControllerEditedImage ] ;
      
     FFEditingPhotoPost *VCPhotoEdit = [[FFEditingPhotoPost alloc] initWithImage:PhotoForEdit];
     [self performSegueWithIdentifier:@"immagine"sender:self];  
     [self.navigationController pushViewController:VCPhotoEdit animated:NO];
     [self dismissViewControllerAnimated:YES completion:nil];
  
  }
  
  
  
  
  
    - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
    {
          FFEditingPhotoPost * controller = (FFEditingPhotoPost *)segue.destinationViewController;
          controller.FFOriginalImage = FF_image;
      }
  </code></pre>
  
  <p>My problem is that I can not go with storyboard image selected in view CONTROLLR next ... Where am I doing wrong ?</p>
  
  <p>Thank you all for the advice</p>
  
  <p>EDIT : insert view controller that should show photo</p>
  
  <pre><code>#import "FFEditingPhotoPost.h"
  #import "UIImage+Resize.h"
  
  @interface FFEditingPhotoPost ()
  
  @end
  
  @implementation FFEditingPhotoPost
  @synthesize FFScrollView;
  @synthesize FFImageView;
  @synthesize FFOriginalImage;
  @synthesize SelectedFoto;
  @synthesize SelectedFotoMiniature;
  
  
  
  - (id)initWithImage:(UIImage *)image {
      self = [super initWithNibName:nil bundle:nil];
      if (self) {
          if (!image) {
              return nil;
          }
  
          FFOriginalImage = image;
         // self.fileUploadBackgroundTaskId = UIBackgroundTaskInvalid;
         // self.photoPostBackgroundTaskId = UIBackgroundTaskInvalid;
      }
      return self;
  }
  
  - (void)viewDidLoad
  {
      [super viewDidLoad];
  
      FFScrollView = [[UIScrollView alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame]];
      FFScrollView.delegate = self;
      FFScrollView.backgroundColor = [UIColor blackColor];
     // self.view = FFScrollView;
  
      FFImageView = [[UIImageView alloc] initWithFrame:CGRectMake(20.0f, 42.0f, 280.0f, 280.0f)];
      [FFImageView setBackgroundColor:[UIColor blackColor]];
      [FFImageView setImage:FFOriginalImage];
      [FFImageView setContentMode:UIViewContentModeScaleAspectFit];
      FFImageView.layer.masksToBounds = NO;
      FFImageView.layer.shadowRadius = 3.0f;
      FFImageView.layer.shadowOffset = CGSizeMake(0.0f, 2.0f);
      FFImageView.layer.shadowOpacity = 0.5f;
      FFImageView.layer.shouldRasterize = YES;
  
  
      [FFScrollView setContentSize:CGSizeMake(FFScrollView.bounds.size.width, FFImageView.frame.origin.y + FFImageView.frame.size.height + FFImageView.frame.size.height)];
  
      [self shouldUploadImage:FFOriginalImage];
  
  }
  - (BOOL)shouldUploadImage:(UIImage *)anImage {
      UIImage *resizedImage = [anImage resizedImageWithContentMode:UIViewContentModeScaleAspectFit bounds:CGSizeMake(560.0f, 560.0f) interpolationQuality:kCGInterpolationHigh];
  
      UIImage *thumbnailImage = [anImage thumbnailImage:86.0f transparentBorder:0.0f cornerRadius:10.0f interpolationQuality:kCGInterpolationDefault];
  
      // JPEG to decrease file size and enable faster uploads &amp; downloads
      NSData *imageData = UIImageJPEGRepresentation(resizedImage, 0.8f);
      NSData *thumbnailImageData = UIImagePNGRepresentation(thumbnailImage);
  
      if (!imageData || !thumbnailImageData) {
          return NO;
      }
  
      SelectedFoto = [PFFile fileWithData:imageData];
      SelectedFotoMiniature = [PFFile fileWithData:thumbnailImageData];
         [SelectedFoto saveInBackgroundWithBlock:^(BOOL succeeded, NSError *error) {
          if (succeeded) {
              NSLog(@"Photo uploaded successfully");
              [SelectedFotoMiniature saveInBackgroundWithBlock:^(BOOL succeeded, NSError *error) {
                  if (succeeded) {
                      NSLog(@"Thumbnail uploaded successfully");
                  }
              }];
          } else {
          }
      }];
  
      return YES;
  }
  </code></pre>