Note that there are some explanatory texts on larger screens.

plurals
  1. POsetImage not working
    primarykey
    data
    text
    <p>I'm having a problem setting an image. I have a delegate telling me when an image is taken from the imagePickerController. It sends it to the owner controller, and then I try to set the image on another controller. It all seems like it should be working... but whenever I the view shows up, the image isn't there. Here's the code:</p> <pre><code>// this gets called when an image has been chosen from the library or taken from the camera // it is in the viewController in charge of grabbing an image (.m file) - (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info { UIImage *image = [info valueForKey:UIImagePickerControllerOriginalImage]; if(self.delegate) { [self.delegate didAcquirePicture:image]; } } //This is in the controller .m file - (void)didAcquirePicture:(UIImage *)picture { if(picture != Nil) { self.photoEditView = [[PhotoEditViewController alloc] init]; [self.photoPicker.imagePickerController dismissModalViewControllerAnimated:NO]; [self.photoEditView.imageView setImage:picture]; [self presentModalViewController: self.photoEditView animated:NO]; } } //this is the photoEditViewController .h #import &lt;UIKit/UIKit.h&gt; @class PhotoEditViewController; @protocol PhotoEditViewControllerDelegate @end @interface PhotoEditViewController : UIViewController { IBOutlet UIImageView *imageView; } @property (retain) UIImageView *imageView; @end //this is the photoEditView .m file #import "PhotoEditViewController.h" @implementation PhotoEditViewController @synthesize imageView; - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; if (self) { // Custom initialization } return self; } - (void)dealloc { [super dealloc]; [imageView dealloc]; } @end </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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