问题描述
我正在尝试使用.jss.但我不知道它为什么不工作.我有一个mywindow.js文件,我已经创建了一个mywindow.jss文件.
在mywindow.jss文件
中#b { width: 40; height: 50; color: '#324f85'; font: {fontFamily: 'Helvetica-Bold', fontSize: 15}; }
在mywindow.js
中var myButton = Titanium.UI.createButton({ id : "b", title: 'clickME' });
我不知道我在这里做错了什么.
.js和.jss文件位于同一位置.使用SDK 1.8.1
推荐答案
每当更改(或创建)任何JSS类时,您都需要在样式更改之前清理您的项目.
钛菜单栏>项目>清洁...
其他推荐答案
问题描述
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
推荐答案
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...
其他推荐答案
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