In my FirstViewController
I have write this code for switch background if device is iPhone4 or iPhone5:
Filename:
bg-for5-568@2x.png
bg-for4@2x.png
bg-for4.png
- (void)viewDidLoad
{
[super viewDidLoad];
UIImage *backgroundImage = [[UIImage alloc] init];
if([[UIScreen mainScreen]bounds].size.height == 568)
{
backgroundImage = [UIImage imageNamed:@"bg-for5-568h"];
}
else
{
backgroundImage = [UIImage imageNamed:@"bg-for4"];
}
self.view.backgroundColor = [[[UIColor alloc] initWithPatternImage:backgroundImage] autorelease];
[backgroundImage release];
}
When i lanch the app on my simulator, the background for iphone5 show double size, out of the view.
/* RESOLVED THANK YOU */