title: How do I change an image based on the size of the iphone screen? Please assist me
body: <p>On the front page of my app I have two images, which are laid over a portion of two buttons. The buttons are automatically re-scaled (via depending on the size of the iPhone screen. Unfortunately when the images are re-scaled it ends up being pretty ugly.</p>
  
  <p>Can I dictate the size and location of the two images (via code), depending on the size of the iphone screen? If so how would I go about doing so?</p>
  
  <p>Thanks for helping a novice out!</p>
  
  <p>Update 13MAR13</p>
  
  <p>This is the code I tried before. It causes no errors, but no images appear on the page! </p>
  
  <pre><code>if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone)
  {
      CGSize result = [[UIScreen mainScreen] bounds].size;
      if(result.height == 480)
      {
          UIImageView *myImageView = [[UIImageView alloc]initWithFrame: CGRectMake(220, 2.5, 95, 75)];
          myImageView.image = [UIImage imageNamed:@"BFS.png"];
          UIImageView *myImageViewtwo = [[UIImageView alloc]initWithFrame: CGRectMake(300, 100, 95, 75)];
          myImageViewtwo.image = [UIImage imageNamed:@"RMS.png"];
  
  
      }
      if(result.height == 568)
      {
          UIImageView *myImageView = [[UIImageView alloc]initWithFrame: CGRectMake(100, 400, 95, 75)];
          myImageView.image = [UIImage imageNamed:@"BFS.png"];
          UIImageView *myImageViewtwo = [[UIImageView alloc]initWithFrame: CGRectMake(100, 300, 95, 75)];
          myImageViewtwo.image = [UIImage imageNamed:@"RMS.png"];
  
      }
  }
  </code></pre>