Someone else had this problem, but it looks like it is not resolved http://developer.appcelerator.com/question/40541/backgroundimage-problems
I have a background image:
var window = Titanium.UI.createWindow({ backgroundImage:'./imgs/whitey1.png' });and a regular image:
var end = Titanium.UI.createImageView({ image:'./imgs/end.png', maxWidth: '100%' });Both of which show up fine in the emulator, but once it is pushed to my iPhone, the background shows up as black and the image does not show up.
I have tried:
- Resaving these two images in Photoshop, Gimp, etc
- have tried changing the path to: '/imgs/end.png', 'imgs/end.png', './imgs/end.png', 'end.png', '/end.png', './end.png', 'iphone/end.png', '/iphone/end.png', and './iphone/end.png'
None of the above have worked.
This is extremely frustrating, especially for something so simple.
4 Answers
Check the case on your paths and filename (upper vs lower case). The Emulator is much more tolerant than the device.
Is there such a property as maxWidth on imageView ? I cant see it in the docs. Have you just tried width:'100%' ?
It seems this might be an issue of relative vs absolute paths. The emulator will load relative path from project root or Resources directory. Put images dir in Resources dir and use absolute paths like: /images/MyImage.png
i have the same problem and i cant find the solution. some of the png is display and another not display ???.
Your Answer
Think you can help? Login to answer this question!