Git Product home page Git Product logo

titanium-mobile-custom-tab-bar's Introduction

Custom Tab Bar

Easily extend tabbar in Appcelerator Titanium mobile for iPhone app to allow any image to be used!

All available settings are shown in the example.

Example

// Create the tab group
var tabGroup = Titanium.UI.createTabGroup();

var win1 = Titanium.UI.createWindow({ title:'Tab 1' });
var tab1 = Titanium.UI.createTab({ 
	icon: 'home.png',
	selectedIcon: 'home_s.png',
	title:'Window 1',
	custom: true, window:win1 
});
var win2 = Titanium.UI.createWindow({ title:'Tab 2'});
var tab2 = Titanium.UI.createTab({ 
	icon: 'home.png',
	title: 'Window 2',
	window:win2 
});
tabGroup.addTab(tab1);  
tabGroup.addTab(tab2);  

// open tab group
tabGroup.open();

// include the new class
Ti.include("customTabBar.js");

var ctb = new CustomTabBar({
	tabBar: tabGroup,
});

//
// This for loop is OPTIONAL it will allow you to access the new tab bar to hide and show it
// from within any tab via Ti.UI.currentTab.ctb.hide(); or Ti.UI.currentTab.ctb.show()
//
for(i=0; i<tabGroup.tabs.length; i++) {
	tabGroup.tabs[i].ctb = ctb;
}

setTimeout(function() {
	//int value is the speed that the tab bar will hide
	ctb.hide(400);
}, 1200);

setTimeout(function() {
	//int value is the speed that the tab bar will show
	ctb.show(0);
}, 2800);

titanium-mobile-custom-tab-bar's People

Contributors

mattapperson avatar

Watchers

James Cloos avatar Mostafa Elkady avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.