0

我正在制作一个左侧带有滑动菜单的应用程序(请参阅http://mobile.tutsplus.com/tutorials/appcelerator/titanium-mobile-create-a-sliding-menu-for-ios/)。我正在尝试为行添加背景,但每次我尝试这样做并启动模拟器时,背景只能看到一点点,因为出于某种原因,行标题后面有一个白色背景。这是代码:

    var menuTitles = [
       {title: 'Home', backgroundImage: "images/row_BG.png", id: 1},
       {title: 'Vestigingen', height: 30, font:{fontSize: 14, fontWeight: "bold", fontFamily: "Helvetica"}},
       {title: 'Han Fortmann', backgroundImage: "images/row_BG.png", leftImage: 'images/HF_Logo_@2x.png', id: 2, font:{fontSize: 14, fontWeight: "normal", fontFamily: "Helvetica"}},
       {title: 'Johannes B.', leftImage: 'images/JB_Logo_@2x.png', id: 3, font:{fontSize: 14, fontWeight: "normal", fontFamily: "Helvetica"}}
    ];
4

1 回答 1

1

也许您应该精确您正在使用的Titanium 版本以获得更准确的答案。

不过,我认为您正在寻找的答案是backgroundColor: 'transparent'属性。试试这个,它应该可以工作:

{backgroundColor: 'transparent', title: 'Home', backgroundImage: "images/row_BG.png", id: 1}
于 2013-09-15T23:13:17.157 回答