images appear bigger or distorted on iphone

You must Login before you can answer or comment on any questions.

I am using the following function:

var b4 = Titanium.UI.createButton({
    title : '',
    top : 360,
    width : 190,
    height : 20,
    backgroundImage : '../images/signup.gif',
});
 
win.add(b4);
When I deploy to the iphone, the button above looks distorted (only the lower part of the sign up button shows). Now sure what to do...

How can I fix this?

— asked 8 months ago by Weina Scott
1 Comment
  • Missing from your question are a number of important pieces of information. I suggest you take a look at the Using Questions and Answers article, specifically the Q&A Question Checklist. The missing information is critical to reproducing problems in a test environment and often indicates other factors that cause the undesirable outcome you are experiencing.


    — commented 8 months ago by Stephen Feather

2 Answers

Accepted Answer

Well, gifs don't stretch well and are kind of going out of style. Might want to try a PNG with matching dimensions to your button.

Also, in the future, when discussing problems with visual elements, its nice, you know, to have a visual reference to go by, such as a screen shot or drawings.

I found some issues using backgroundImage in retina devices. You may want to try to not use two image versions (retina and non-retina). Try just the non-retina version and confirm whether is also distorting.

Your Answer

Think you can help? Login to answer this question!