Search code examples
iosxcoderetina-displayiphone-4iphone-5

background image in retina 4


I am using the following code to set a background in my iphone app.

[[self view] setBackgroundColor:[UIColor colorWithPatternImage:[UIImage imageNamed:@"background_final.png"]]];

The problem is that if I try the app in iPhone 5.. retina 4" the background image gets tiled instead of having black spaces where there should not be any images.

I have a [email protected] in the app, and it has the correct dimensions but still I am not getting the right image background.

Any Ideas on how to fix this?


Solution

  • delete the [email protected] and you will get the expected results