Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

a.periz

macrumors newbie
Original poster
Jul 17, 2009
5
0
Hi,
i'm developing an app with custom UISlider, so i created some png images, add them into the project and i follow the UICatalog method to create the sliders.
When I install this app in the iPhone simulator, it works very well, but, when i put it into the iPhone, the sliders don't appear...
I tried to load the same image i use for the slider in a UIImageView and add it into the main view (self.view) and it doesn't appear yet...
Somebody can help me?
Thanks so much!

Andrea
(sorry for my english)
 
How did you add the images to your project? Did you copy them or just link them? If you just linked them, that's why they work in the simulator but not on the device.
 
Yes, i copy the images in the project and i also checked (through ssh) that the images are into the .app forlder in the iPhone...
 
I once had the same problem. In my case I had a UITableView with some transparent images as cell icons. The non transparent pngs were displayed in the simulator as well as on the device, the transparent not. So I removed transparency and it worked.
 
I split the initialization:
Code:
		UIImage * aux = [UIImage imageNamed:@"redSliderDefault.png"];
        UIImage *stetchLeftTrack = [aux stretchableImageWithLeftCapWidth:10.0 topCapHeight:0.0];
		NSLog(@"Aux = %@; stetchLeftTrack = %@", aux, stetchLeftTrack);

and they are both nil!
do you know why?

Thanks
 
The usual explanation is that the case of the file names varies between the real file name and the name you're trying to load. The Sim file system is case-insensitive and the phone file system is case-sensitive.
 
I found the problem!
The pngs MUST have a 150 dpi resolution..
this works for me...
 
Yes, i copy the images in the project and i also checked (through ssh) that the images are into the .app forlder in the iPhone...

in my application, the images are not present in .app folder.:confused:
Can anyone please, tell me the way, to add images in the .app folder.
(The folder created for distribution in ad-hoc mode):)
 
check to make sure the .PNGs were saved in an RGB space (not grayscale, etc.). i've had issues with images that were saved with a grayscale space turning out crazy / not appearing on the device.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.