title: How do I transfer a strong id variable into a UIImage variable?
body: <p>I have a variable</p>
  
  <pre><code>@property (strong, nonatomic) id dataObject;
  </code></pre>
  
  <p>It is a pointer to a <code>UIImage</code>.  I want to send it to my new variable.</p>
  
  <pre><code>@property (nonatomic, retain) UIImage *theImage;
  </code></pre>
  
  <p>When I try to do this, the app crashes with this error:
  <code>unrecognized selector sent to instance 0x68423b0</code></p>
  
  <p>How do I send it to my new variable?  Thanks in advance.</p>
  
  <p>contentViewController.h:</p>
  
  <pre><code>#import &lt;Foundation/Foundation.h&gt;
  #import &lt;UIKit/UIKit.h&gt;
  #import "pageAppViewController.h"
  
  @class pageAppViewController;
  
  @interface ViewController : UIViewController
  
  {
      NSArray *content;
      UIImageView *theImageView;
      UIImage *theImage;
  }
  
  @property (strong, nonatomic) IBOutlet UIImageView *theImageView;
  @property (strong, nonatomic) id dataObject;
  @property (nonatomic, retain) UIImage *theImage;
  
  @end
  </code></pre>
  
  <p>contentViewController.m:</p>
  
  <pre><code>#import "ViewController.h"
  #import "pageAppViewController.h"
  
  @implementation ViewController
  
  @synthesize theImageView, dataObject;
  @synthesize theImage;
  
  
  - (void) viewWillAppear:(BOOL)animated
  {
      [super viewWillAppear:animated];
  
      //this is the line that is causing the problems.
      theImage = dataObject;
      theImageView = [[UIImageView alloc] initWithImage: theImage];
  
      [self.view addSubview:theImageView];   
  }
  @end
  </code></pre>