Some of my apps use custom images as the background. What is the proper way to check the screen size to place the proper image?
Should it be something like this in viewDidLoad:
if ([UIScreen mainScreen] == 2.0)
{
UIImage * backgroundImage = [UIImage imageNamed:@"[email protected]"];
backgroundImageView = [[UIImageView alloc] initWithImage:backgroundImage]];
}
else
{
UIImage * backgroundImage = [UIImage imageNamed:@"bgimage.png"];
backgroundImageView = [[UIImageView alloc] iniWithImage:backgroundImage]];
}
Any tips/advice is much appreciated!
Thanks!