title: objective-c singleton shall store UIimage. Does not work
body: <p>I have a singleton in place and want to store a <code>UIImage</code> in the singleton. Somehow this does not work. I get the Compiler Error: <code>No visible @interface for 'UIImage' declares the selector 'setPhoto'</code> 
  Interestingly working with my <code>NSMutableArray</code> on the singleton works fine. </p>
  
  <p>How can I store a <code>UIImage</code> on my singleton to access it later from another class?</p>
  
  <h3>Singleton.h</h3>
  
  <pre class="lang-c prettyprint-override"><code>#import &lt;Foundation/Foundation.h&gt;
  
  @interface SingletonClass : NSObject
  
  @property (strong, nonatomic) NSMutableArray *myArray;
  @property (strong, nonatomic) UIImage *photo;
  
  + (id)sharedInstance;
  -(void)setPhoto:(UIImage *)photo    
  
  @end
  </code></pre>
  
  <h3>Singleton.m</h3>
  
  <pre class="lang-c prettyprint-override"><code>#import "SingletonClass.h"
  
  @implementation SingletonClass
  
  static SingletonClass *sharedInstance = nil;
  
  // Get the shared instance and create it if necessary.
  + (SingletonClass *)sharedInstance {
      if (sharedInstance == nil) {
          sharedInstance = [[super allocWithZone:NULL] init];
      }
  
      return sharedInstance;
  }
  
  // We can still have a regular init method, that will get called the first time the Singleton is used.
  - (id)init
  {
      self = [super init];
  
      if (self) {
          // Work your initialising magic here as you normally would
          self.myArray = [[NSMutableArray alloc] init];
          self.photo = [[UIImage alloc] init];
      }
  
      return self;
  }
  
  // We don't want to allocate a new instance, so return the current one.
  + (id)allocWithZone:(NSZone*)zone {
      return [self sharedInstance];
  }
  
  // Equally, we don't want to generate multiple copies of the singleton.
  - (id)copyWithZone:(NSZone *)zone {
      return self;
  }
  
  -(void)setPhoto:(UIImage *)photo {
      photo = _photo;
  }
  </code></pre>
  
  <h3>DetailView.m</h3>
  
  <pre class="lang-c prettyprint-override"><code>-(void)sharePhoto:(id)sender {
  
      SingletonClass *sharedSingleton = [SingletonClass sharedInstance];
  
      [sharedSingleton.photo setPhoto:self.imageView.image];
      //Compiler Error: No visible @interface for 'UIImage' declares the selector 'setPhoto'
  
      [self.navigationController popViewControllerAnimated:YES];
  
  }
  </code></pre>