how can i use use local images in my titanium project
i'm trying to change my background of a window in titanium , unfortuantly its not working. i also tried to use 开发者_JS百科many local images and they did't load. any help is highly appreciated ,How can use my resources ?
var win1 = Titanium.UI.createWindow({
title:'Hello',
backgroundImage:'back.png',
});
You can do that, just like that. backgroundImage
is supported on window.
Just make sure you use the right path:
backgroundImage: Ti.FileSystem.resourcesDirectory + 'back.png'
Here I am assuming back.png (case sensitive) is actually in the resources directory root.
精彩评论