views:

298

answers:

2

Hi all,

in an iPhone app, I have a UITabBar with three tabs. One has a system image, two more have custom images. These are PNGs, 30x30, palette-based, mostly transparent. These images show up fine in the simulator, but on the device, all I see is a grey gradiented square on a tab. The shapes on these images are grey to begin with, but they do show up as expected on the simulator.

Any ideas, please?

A: 

The device itself is pickier about image formats than the simulator is. I've had a number of instances where things showed up in the simulator and didn't on the phone. What has always worked for me is to encode all of my PNGs as 24-bit PNG-24 (in Photoshop) -- for icons and the like, the increased file size is trivial, and it solves my issues with images not showing up.

John Biesnecker
For the record, the iPhone simulator officially sucks. Microsoft Device Emulator beats it any day. And that's an expert opinion of mine, not a flame bait at all.
Seva Alekseyev
Just too bad you have to code for Windows Mobile (*shudder*) to use it ;)
John Biesnecker
Coding for WM is much better than actually using it.
Seva Alekseyev
A: 

The image should be white on transparent. It's in the UI design guide. In my case, it was grey on transparent. Simulator forgives that, the device does not.

Seva Alekseyev