views:

41

answers:

2

Here is the viewDidLoad:

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

It can show the simulator, but not on the device, why?? thz.

+1  A: 

The device is case-sensitive, so make sure you've got bg.png exactly right.

Tom Irving
checked, still can't load the img.
Tattat
stigi beat me to the next point ;)
Tom Irving
+4  A: 

Also check that the image isn't a PSD named with a PNG extension. The Simulator can show PSD images, the device can't. :)

stigi
Got it! u got the point. Thz u very much, it waste me many time to find out that issue. Thz u!!
Tattat