Last Updated: February 25, 2016
·
887
· milesmatthias

Using Nav Buttons with Window Title Control

Titanium allows you to use a custom view for the nav bar of a window via the titleControl property. When you go to add nav buttons to this window, you would expect to do something like:

window.setRightNavButton(myBtn);

but you'd be wrong, if you have a custom titleControl. Instead, you have to manually position and add buttons to the titleControl itself:

myTitleControl.add(myBtn);

This took me a while to realize since it's not very well documented by Titanium. Hope this saves you some time!