Does .jss feature is not supported in Titanium mobile SDK

放肆的年华 提交于 2019-12-13 05:23:47

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!