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.
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?
Thanks for helping a novice out!
Update 13MAR13
This is the code I tried before. It causes no errors, but no images appear on the page!
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"];
}
}