如何在Titanium中画一条线?

Dav*_*ith 4 iphone android titanium

如何在适用于Android和iPhone的Titanium中画一条线?

小智 5

要创建一条线,我用;

var view = Ti.UI.createView({
    height:180,
    width:300
});

var line = Ti.UI.createView({
    height:2,
    bottom:0,
    left:0,
    right:0,
    borderWidth:1,
    borderColor:'#aaa'
 });

view.add(line);
Run Code Online (Sandbox Code Playgroud)