iphonetitanium-mobile

Nav Bar height is 43 pts?


According to every online resource, the Nav Bar height should be 44pts (88px on Retina screens).

Indeed, when I take a screenshot of my iPhone (see below), the Status bar's height is 20pts, and the NavBar's height is 44pts, but that's split into a 1pt white pixels, and 43 "blue" pixels:

iPhone orig

When I develop my app and create a NavBar (standard), there is no "white" pixel between the StatusBar and the NavBar, so the NavBar's height is 43pts (and not 44pts). This makes the inner window 1pt higher:

My version

My entire code is simply 5 lines (app.js):

var mainWindow = Titanium.UI.createWindow();
var innerWindow = Titanium.UI.createWindow({ title : "Settings" });
var navGroup = Titanium.UI.iPhone.createNavigationGroup({ window : innerWindow });
mainWindow.add(navGroup);
mainWindow.open();

Any ideas??


Solution

  • Maybe it'll help some one some day, if you add "top : 0" when creating the NavigationGroup, you'll get that extra pixel line :)

    var navGroup = Titanium.UI.iPhone.createNavigationGroup({ top : 0, window : innerWindow });