help please. my code that change UIImageView is:
- (void) viewDidLoad {
background.image = [UIImage imageNamed:@"myImage.png"];
}
It works good on iPhone and also on iPad but, how can I change “myImage.png” to “myImageHD.png” when I will run this app on my iPad???? I just need to show myImageHD if my app will run on iPad. IT CAN BE DONE WITH XIB FILE, BUT I NEED WITH CODE TO FIX IT. To detect if app run on iPad, and show myImageHD. Thanks.
Do this,
Another way to do this would be,
UI_USER_INTERFACE_IDIOM()also can be used to check if the current device is iPad or iPhone. Instead of[[UIDevice currentDevice] userInterfaceIdiom]in the above if condition, you can useUI_USER_INTERFACE_IDIOM()also.