0
votes

Hello i was just wondering how i would go about making the following header with navigation buttons in Titanium Studio(javascript). The other method i have been using is a tab menu with the bottom tabs visibility set to false.

So turns out i cant post images, so i will link to an older thread that uses titanium ALLOY.

How to create a header bar with buttons in Titanium JS?

Thanks for any help

1
sorry I don't understand what you're trying to achieve...why not upload the img to an image hosting site and put the linkphil

1 Answers

3
votes

As long as your Window is inside a TabGroup or NavigationWindow, you can easily add buttons to its navigation bar. First create each button object, then assign the buttons to the Window (not NavigationWindow or TabGroup) leftNavButton and rightNavButton properties, like so:

var groupsButton = Ti.UI.createButton({
    title: "Groups"
});

var addButton = Ti.UI.createButton({
    systemButton: Ti.UI.iPhone.SystemButton.ADD
});

var win = Ti.UI.createWindow({
    title: "Contacts",
    backgroundColor: "#ffffff",
    leftNavButton: groupsButton,
    rightNavButton: addButton
});

var navWin = Ti.UI.iOS.createNavigationWindow({
    window: win
});

navWin.open();