Titanium 增加ipad的导航栏高度

Titanium 增加ipad的导航栏高度,titanium,titanium-mobile,Titanium,Titanium Mobile,试图增加iPad的导航栏 navgroup.height = 80; 有人能建议我增加iPad的导航栏吗。好吧,苹果的iOS人机界面指南规定“不要以编程方式指定导航栏的高度” navgroup.height = 80; 所以你不能,这在iPad上是硬编码的 navgroup.height = 80; 但是,您可以使用自己的自定义渐变创建自己的导航栏视图,只需将其浮动到窗口顶部,这是一个开始,背景渐变和自定义高度为50px: nav

试图增加iPad的导航栏

navgroup.height = 80;          

有人能建议我增加iPad的导航栏吗。

好吧,苹果的iOS人机界面指南规定“不要以编程方式指定导航栏的高度”

navgroup.height = 80;          
所以你不能,这在iPad上是硬编码的

navgroup.height = 80;          
但是,您可以使用自己的自定义渐变创建自己的导航栏视图,只需将其浮动到窗口顶部,这是一个开始,背景渐变和自定义高度为50px:

navgroup.height = 80;          
var win = Ti.UI.createWindow({
    navBarHidden : true
});
var navBar = Ti.UI.createView({
    top : 0,
    width : Ti.UI.FILL,
    height : 50, // Your custom navbar height
    backgroundGradient : { // Nice linear gradient, put your own custom colors here
        type : 'linear',
        startPoint : {
            x : 0,
            y : 0
        },
        endPoint : {
            x : 0,
            y : '100%'
        },
        colors : [{
            color : '#75060a',
            offset : 0.0
        }, {
            color : '#cc0000',
            offset : 1.0
        }]
    }
});
// I usually add a bottom border view, just looks better IMO
navbar.add(Ti.UI.createView({
    width : Ti.UI.FILL,
    height : 1,
    bottom : 0,
    backgroundColor : '#000000'
}))
win.add(navBar);

您可能想添加自定义按钮和标题,使其更具功能性,但这应该可以让您开始。这种方法的好处在于,你拥有最多的控制权,而且完全跨平台(在android上运行得很好)。

是的,怪苹果,但用这种方法,至少你可以为android/blackberry/mobile web以及ios构建。我不怪苹果!!!但没关系,他们也为其他第二阶段的手机提供了一些替代方案!!!
navgroup.height = 80;