title: Cannot programmatically show image in UIImageView (iPhone)
body: <p>I'm developing a iPhone app, but I ran into a snag.</p>
  
  <pre><code>NSString *fileLocation = [[NSBundle mainBundle] pathForResource:@"happy.1" ofType:@"jpg"];
  UIImage *new_image = [UIImage imageWithContentsOfFile:fileLocation]; 
  [self setImage:new_image];
  
  if (new_image == nil) {
      NSLog(@"can't load image happy.1.jpg");
  }
  bgImageView.image = image;
  </code></pre>
  
  <p>That's the code I'm using to show an image, but it doesn't appear! new_image isn't nil, which I understand it would be if it couldn't load the image. bgImageView is an IBOutlet and connected in IB.</p>
  
  <p>Please tell me what I'm doing wrong. Thanks!</p>
  
  <p>Edit: also, this does not work on the simulator nor device</p>