title: Adding an image to a NSObject - Possible?
body: <p>I'm going to have objects, read from a .csv (Comma seperated file) which contains file names, later. Thats why i'm trying to do it like this. </p>
  
  <p>What I would like to accomplish is to have the button get the image from the filename in the csv.</p>
  
  <p>What i've tried so far: 
  The Object:</p>
  
  <pre><code>@interface question : NSObject
  {
  @private
  UIImage *imageName;
  }
  @property (nonatomic, retain)UIImage *imageName;
  </code></pre>
  
  <p>(I have tried with NSString aswell as UIImage, neither works like I want them)</p>
  
  <p>ViewController:</p>
  
  <pre><code>- (void)viewDidLoad
  {
  [super viewDidLoad];
  question *question1 = [[question alloc]init];
  [question1.imageName initWithContentsOfFile:@"Default.png"];//Will be read from a csv later on, just typing it in manually for a test
  testImage = question1.imageName;
  
  }
  
  
  -(void)imageshow
  {
  //(UIImage *)testImage;(NSString *)imageNameString; Didnt work
  //[self.testImage initWithContentsOfFile:@"%@",questiont.imageName]; - Doesnt work either
  
  [testButton setImage:testImage forState:UIControlStateNormal];
  
  
  }
  -(IBAction)test:(id)sender
  {
  [self imageshow];
  }
  </code></pre>
  
  <p>Where this code fails is when I press the test button, nothing happens (not crash)</p>
  
  <p>How can I do this properly? 
  (Add an image with a text filename to a NSObject and then show it in a button/image view)</p>