I am working on the project I described in IPhone development: How to build a custom view hierarchy? . I am still struggling with the issues I described in that topic and meanwhile I tried to do something meaningful.
I needed to print a background image in the first view and I wrote the following code in my _MyAppName_ViewController.m class:
self.backGroundImage = [UIImage imageNamed:@"giris.jpg"];
self.view.backgroundColor = [UIColor colorWithPatternImage:self.backGroundImage];
backGroundImage is a property I declared in the header file, in the type of UIImage. giris.jpg is an image with the size of 640×960 but what I see in the simulator is that the upper left 320×480 sized part of the image. I tried to change the IOS Simulator Device type from IPhone to IPhone (Retina 3.5 Inch) and to IPhone (Retina 4.0 Inch) but I get the same results. Is there something I am missing in the code?
Please make sure that you included proper Non retina and retina image size of 320×480 and 640×960 respectively. The problem is the giris.jpg is of size 640×960 is considering as non retina due to its name.
For Non retina – 320×480 – giris.jpg
For Retina – 640×960 – giris@2x.jpg