问题
I am trying to use .jss. but i dont know why it is not working. I have a mywindow.js file and i have created a mywindow.jss
file.
in mywindow.jss
file
#b
{
width: 40;
height: 50;
color: '#324f85';
font: {fontFamily: 'Helvetica-Bold', fontSize: 15};
}
in mywindow.js
var myButton = Titanium.UI.createButton({
id : "b",
title: 'clickME'
});
I dont know what i am doing wrong here.
Both .js and .jss file are in same location. Using sdk 1.8.1
回答1:
Whenever you change (or create) any JSS classes, you need to clean your project before the style changes come through.
Titanium Menu bar > Project > Clean...
回答2:
yes it can be used, you can see the sample at Kitchen sink, its that people prefer to do it the normal way(coding both the UI & styles together) than with JSS
来源:https://stackoverflow.com/questions/9496233/does-jss-feature-is-not-supported-in-titanium-mobile-sdk