【发布时间】:2013-12-09 15:30:44
【问题描述】:
我正在尝试向左右导航按钮添加自定义按钮,但如果我设置了背景图像,似乎会出现一个间隔。如果仅设置标题文本,则间距是正确的。这是我重现问题的示例,我添加了一个边框颜色以表明图像不是罪魁祸首。
var win = Ti.UI.createWindow({
width: '100%',
height: '100%',
backgroundColor: 'white'
});
var leftBtn = Ti.UI.createButton({
backgroundImage:"/images/headerCmdMenu.png",
width: '81px',
height:'74px',
title: 'left',
borderColor: 'red',
borderWidth: 1
});
var rightBtn = Ti.UI.createButton({
width: '81px',
height:'74px',
title: 'right'
});
win.leftNavButton = leftBtn;
win.rightNavButton = rightBtn;
var nc = Ti.UI.iOS.createNavigationWindow({
window : win
});
nc.open();
这是视图的截图……
http://imagebin.ca/v/13wq8Jrn1hst
任何想法如何解决这个问题? 谢谢。 克里斯
注意:我确实在官方论坛上问过这个问题,但 14 天后没有得到答复。 http://developer.appcelerator.com/question/160022/leftnavbutton-and-rightnavbutton-spacer-appears-if-using-backgroundimage-#comment-196608
【问题讨论】:
标签: uinavigationcontroller titanium appcelerator