function createImage(img) { /* * Create the left Image */ var left_image = Ti.UI.createImageView({ left : 5, width : 100, height : 40, image : img }); return left_image; }I am using this function to add a left image to a table view, but the images don't scale. Seems to work on Andriod.
I know labels can scale on iPhone. Can I use label with remote image? As 'img' is a remote image.
3 Answers
Images definitely scale on iOS. I've used ImageViews within a custom tableview row, and they scale. You don't really show exactly what you're doing with the imageview you get back from createImage().
image scale codes may be useful to you.
public static void ScaleImageDemo()
{
string fileName = "c:/Sample.png";
REImage reImage = REFile.OpenImageFile(fileName);
ImageProcessing.ApplyResize(reImage, 0.5f);
REFile.SaveImageFile(reImage, "c:/reimage.png", new PNGEncoder());
}
Hi steven, to answer your question Can I use label with remote image? so yes you can use label with remote imges. backgroundImage : String
Background image for the view, specified as a local file path or URL
Your Answer
Think you can help? Login to answer this question!